Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
I'm having a hard time figuring out what is wrong with my calculation other than its hideousness...
MEASURE: Stop Time Per Unit:=[Total Stop Time]/[Total Machines]
Now I need to add up all the process groups that fall under/contribute to that stop time:
STPU Overall:=CALCULATE([Stop Time Per Unit],DimID[Cause Group]="",DimID[Cause Group]="Unknown",DimID[Cause Group]="Supply Chain", DimID[Cause Group]="Design",DimID[Cause Group]="Engineering",etc, etc, etc, for the other 11 cause groups.)
Is there a better more efficient way of doing this? I guess I should also mention that when I add it up like this... it is: = BLANK
Thanks DAX experts
Solved! Go to Solution.
Hi @groffia,
If you have to list the values explicitly, you can try it out like this:
STPU Overall:=
CALCULATE (
[Stop Time Per Unit],
DimID[Cause Group]
IN { BLANK (), "Unknown", "Supply Chain", "Design", "Engineering", "etc" }
)If the measure can read the values from a column, you can try it like this:
a =
CALCULATE (
[Stop Time Per Unit],
DimID[Cause Group] IN VALUES ( 'table1'[column] )
)Note: table1 could be created by formula or by hand.
Best Regards,
Dale
Hi @groffia,
If you have to list the values explicitly, you can try it out like this:
STPU Overall:=
CALCULATE (
[Stop Time Per Unit],
DimID[Cause Group]
IN { BLANK (), "Unknown", "Supply Chain", "Design", "Engineering", "etc" }
)If the measure can read the values from a column, you can try it like this:
a =
CALCULATE (
[Stop Time Per Unit],
DimID[Cause Group] IN VALUES ( 'table1'[column] )
)Note: table1 could be created by formula or by hand.
Best Regards,
Dale
Hi Dale @v-jiascu-msft, what if I want to use the values from that other table and do some calculation like below , its not working as I have written here ... please let me know if you need me to explain my scenario more?
a =
CALCULATE (
[Stop Time Per Unit] * values('table1[column2]),
DimID[Cause Group] IN VALUES ( 'table1'[column] )
)
never mind made it to work refering to this link https://community.powerbi.com/t5/Desktop/DAX-Using-variables-inside-iterators-such-as-SUMX/td-p/5210...
I knew there was a simpler way... your solution worked flawlessly. Thank you for your help!
-Steve
Yes, I realize it is a redundancy... but unfortunately necessary.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 40 | |
| 38 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 34 | |
| 33 | |
| 30 |