Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi All,
I am 90% of the way in a calculation but I'm stuck now... I am summarising a table based on the filter context (if someone filters date in a date slicer). All I want to do is return the grand total of rows.
This is not what I want:
This is what I want:
This is my DAX so far:
Solved! Go to Solution.
Hi that table is an aggregation of counts by month. So it's not a raw table. I am trying to get a average of counts by month.
I was able to get the numerator correct, but the denominator not. Anyway, I found a solution that has worked as below.
AVG Ticket Volume =
VAR AVGIT =
CALCULATE (
AVERAGEX (
ADDCOLUMNS (
SUMMARIZE ( Tickets, 'Tickets'[Module], 'Dates'[MonthYear] ),
"@Count", CALCULATE ( COUNT ( Tickets[No] ) )
),
[@Count]
),
ALLSELECTED ()
)
RETURN
AVGIT
I'm having a hard time seeing why you need such complexity in your measure:
Can you tell me why something simple like ALL(Table) wouldn't work?
Hi that table is an aggregation of counts by month. So it's not a raw table. I am trying to get a average of counts by month.
I was able to get the numerator correct, but the denominator not. Anyway, I found a solution that has worked as below.
AVG Ticket Volume =
VAR AVGIT =
CALCULATE (
AVERAGEX (
ADDCOLUMNS (
SUMMARIZE ( Tickets, 'Tickets'[Module], 'Dates'[MonthYear] ),
"@Count", CALCULATE ( COUNT ( Tickets[No] ) )
),
[@Count]
),
ALLSELECTED ()
)
RETURN
AVGIT
User | Count |
---|---|
84 | |
80 | |
70 | |
47 | |
43 |
User | Count |
---|---|
108 | |
54 | |
50 | |
40 | |
40 |