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.
The article you are trying to access is permanently deleted.
Hi,
I am dealing with a simple issue but I cannot find a solution for that specific scenario.
I have a matrix table that is showing a % of results for Morning and late shift. Calculation is just [productivity]/[target].
However my subtotal column is making an average out of 2 results, while I need subtotal to be the same calculation just for the total of late and morning.
Solved! Go to Solution.
Hi @QuentinBl ,thanks for the quick reply, I'll add more.
Hi @Squairyy ,
Regarding your question, it could be that the calculated column is causing this. You can try using measures.
The Table data is shown below:
Please follow these steps:
1. Use the following DAX expression to create a measure
Measure =
VAR _a = DIVIDE(SUM('Table'[Target]),SUM('Table'[Actual]))
VAR _b = CALCULATE(SUM('Table'[Target]),ALL('Table'[Type]))
VAR _c = CALCULATE(SUM('Table'[Actual]),ALL('Table'[Type]))
RETURN IF(
SELECTEDVALUE('Table'[Actual]),_a,DIVIDE(_b,_c))
2. Use the following DAX expression to create a column
subtotal = DIVIDE([Target],[Actual])
3. Final output
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @QuentinBl ,thanks for the quick reply, I'll add more.
Hi @Squairyy ,
Regarding your question, it could be that the calculated column is causing this. You can try using measures.
The Table data is shown below:
Please follow these steps:
1. Use the following DAX expression to create a measure
Measure =
VAR _a = DIVIDE(SUM('Table'[Target]),SUM('Table'[Actual]))
VAR _b = CALCULATE(SUM('Table'[Target]),ALL('Table'[Type]))
VAR _c = CALCULATE(SUM('Table'[Actual]),ALL('Table'[Type]))
RETURN IF(
SELECTEDVALUE('Table'[Actual]),_a,DIVIDE(_b,_c))
2. Use the following DAX expression to create a column
subtotal = DIVIDE([Target],[Actual])
3. Final output
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Yes I did, for example:
So the proper value is 91,51%. What PowerBi shows:
90,2% which is an average of both values.
Hello,
Did you check that the result is wrong? manually ? i think that your subtotal will always be true this way
User | Count |
---|---|
16 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |