Našimi kurzy prošlo více než 10 000+ účastníků
2 392 ověřených referencí účastníků našich kurzů. Přesvědčte se sami
This article is about SUMX, which can be used in DAX. It is very handful when we need to make some calculation “before” summary or calculate selected rows only.
This article is about SUMX, but other “X-function” such as COUNTAX, COUNTX, AVERAGEX, MINX, MAXX work similarly.
Let´s play with this table containing a list of cars and demonstrate three basic tasks, that can be nicely handled using SUMX.
To summarize the total price of all cars, we could use SUM simply. But how to summarize the price, if every car was discounted by 10 000?
Theoretically, we could create a new column with difference, and then summarize it.
But it is much easier with SUMX:
First argument declares that we want to work with “cars” table. The second argument says that the price will be discounted by 10 000 – this action has to be done with every row prior summary.
Let´s say we are not going to discount all cars, but only cars with price higher then 200 000. We will use the IF function.
The first argument is a table again, The second argument says what has to be done with all rows – using a functon.
Now let´s work with the first argument. We want to summarize the price of red cars only.
This could be combined with the previous steps – we can work with first and second argument independently.
2 392 ověřených referencí účastníků našich kurzů. Přesvědčte se sami
Pište kdykoliv. Odpovíme do 24h
© exceltown.com / 2006 - 2023 Vyrobilo studio bARTvisions s.r.o.
I am not getting the output for:
1.Summary with a nested function
2. Table filtering
Please guide