Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
I'm new to DAX and have followed a number of guides which have got me started but I'm struggling to get something to work and would appreciate some help please!
I have an 'Event' table and a 'Calendar' table and want to produce a graph that shows by month the days when a specific event happened vs days when it didn't. If the event didn't happen, we call it a 'Perfect Day'.
I have created the following measures :
I think I am missing something, possibly very obvious but can't seem to work it out!
Thanks in advance
Solved! Go to Solution.
Try
Num perfect days =
VAR SummaryTable =
ADDCOLUMNS ( VALUES ( 'Calendar'[Date] ), "@num days", [No. of events] )
VAR Result =
COUNTROWS ( FILTER ( SummaryTable, [@num days] = 0 ) )
RETURN
Result
Thanks, that gives me a count - and if I create another measure like this I can stack the 2 measures in a stacked bar - thanks for your help!
Try
Num perfect days =
VAR SummaryTable =
ADDCOLUMNS ( VALUES ( 'Calendar'[Date] ), "@num days", [No. of events] )
VAR Result =
COUNTROWS ( FILTER ( SummaryTable, [@num days] = 0 ) )
RETURN
Result
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
25 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |