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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I am struggling to write the correct DAX measure, most likely due to the measures referencing a paramater.
Here is my current data:
I have Shift (static within table 'Shift Hours') and a user selected parameter for each shift called 'Active' that toggles between 0 (inactive) and 1 (active).
My measure for the Active Field (which references the parameters) is as follows:
I need a measure to return 360, 480 or 0 for the following scenerios:
If shift = 1 and Active = 1 && shift = 2 and Active = 1 && Shift = 3 and Active = 1 then 360
if shift = 1 and Active = 1 && shift = 2 and Active = 1 && Shift = 5 and Active = 1 then 480
else 0
Current scenerio:
I only have Shift 1, 2, and 3 Selected as ACTIVE so I should have a value of 360.
Here is my current measure that does not work.
while it "works" at the row context level in a table, it does not return a singular value of 360
Value =
I have tried so many different variations. I have tried using Sumx and still no luck.
Value:
I am probably over thinking it. Please help.
It would be very easy in excel like so:
Solved! Go to Solution.
I figured it out! I had to call the parameter values as the variables.
I used the following measure:
I figured it out! I had to call the parameter values as the variables.
I used the following measure:
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 36 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |