The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi, I'm having trouble with the below table... and specifically with the 'Turned on' Measure:
Turned_on =
var Interval = CALCULATE([Das_orders],General[Performance Section[Performance Section]]] = "Interval")
var Interval_blank = IF(Interval = 0,1,0)
return
SUMX(General, Interval_blank)
Firstly, how do I get the grand total to appear? and how do I produce the measure to only count the 1 performance section, IE
the grand total for the first row should be 3 as there are 3 intervals = 0 but its summing all interval sections?
Thank you!!
AF
Solved! Go to Solution.
DAX variables are really constants, only calculated when they are declared, so I think you need to move the variables inside the SUMX iteration
Turned_on =
SUMX (
General,
VAR Interval =
CALCULATE (
[Das_orders],
General[Performance Section[Performance Section]]] = "Interval"
)
VAR Interval_blank =
IF ( Interval = 0, 1, 0 )
RETURN
Interval_blank
)
DAX variables are really constants, only calculated when they are declared, so I think you need to move the variables inside the SUMX iteration
Turned_on =
SUMX (
General,
VAR Interval =
CALCULATE (
[Das_orders],
General[Performance Section[Performance Section]]] = "Interval"
)
VAR Interval_blank =
IF ( Interval = 0, 1, 0 )
RETURN
Interval_blank
)