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.
Hello,
I have a measure to calculate a subtraction and the total is not correct. I followed @Greg_Deckler 's Mesaure Totals - The Final Word post.
This is my single measure code:
Uptime =
CALCULATE(
SUMX(
cr4be_productiondailylog,
DIVIDE(
cr4be_productiondailylog[cr4be_availabletime],
COUNTA( cr4be_productiondailylog[cr4be_hour] )
) - [Downtime Total] )
)
This is my Total Measure code:
Uptime Total =
VAR _table = SUMMARIZE(cr4be_productiondailylog, [cr4be_partnumber],"_value",[Uptime])
RETURN
IF(HASONEVALUE(cr4be_productiondailylog[cr4be_partnumber]), [Uptime], SUMX(_table, [_value]))
These are my pbix and data files:
This is what I'm getting:
I appreciate any help.
I'm wondering if I have to change the initial single measure for a simpler one to make it work.
Thanks,
Fernando
Solved! Go to Solution.
Hi @calerof,
You have two main issues on the formula for the total time:
Redo your total to the following measure:
VAR _table =
SUMMARIZE (
cr4be_productiondailylog,
cr4be_productiondailylog[cr4be_workcenter],
cr4be_productiondailylog[cr4be_mold],
[cr4be_partnumber],
cr4be_productiondailylog[cr4be_shiftname],
"_value", [Uptime]
)
RETURN
IF (
ISINSCOPE ( cr4be_productiondailylog[cr4be_partnumber] ),
[Uptime],
SUMX ( _table, [_value] )
)
Check result below and in attach PBIX file.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @calerof,
You have two main issues on the formula for the total time:
Redo your total to the following measure:
VAR _table =
SUMMARIZE (
cr4be_productiondailylog,
cr4be_productiondailylog[cr4be_workcenter],
cr4be_productiondailylog[cr4be_mold],
[cr4be_partnumber],
cr4be_productiondailylog[cr4be_shiftname],
"_value", [Uptime]
)
RETURN
IF (
ISINSCOPE ( cr4be_productiondailylog[cr4be_partnumber] ),
[Uptime],
SUMX ( _table, [_value] )
)
Check result below and in attach PBIX file.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @MFelix ,
Thank you very much for your analysis, the explanation and help, I appreciate it a lot. That made me understand better the function SUMMARIZE.
Best,
Fernando
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 |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |