Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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