Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello, I am trying to create dax to calculate % of GT.
I tried the GT option in visualization but it only GT thats in the table.
While I want to filter it agains GT that ignores some filters that are applied to the table.
This is what I get when I try to use GT.
The total is 2782, but the actual total is 16517.
The 2782 is ~16% of 16517.
Thats what I would want to see instead of 100%.
The table has Top N filter applied to sku number of the product that exist in different table than shorted data.
I would need to creat measure where GT ignotes top N filter but not other filters.
This is the measure of Shoretd qty dax.
Solved! Go to Solution.
I manage to work out the solution.
There might be easier solution but this is what worked for me.
1. I had to create sum measure for base values that ignore sku filter.
I manage to work out the solution.
There might be easier solution but this is what worked for me.
1. I had to create sum measure for base values that ignore sku filter.
@Justas4478 , First create a mesaure for Grand Total ignoring TOPN Filter
GT_Ignoring_TopN = CALCULATE(
SUM('Outbound Delivery'[Total Demand]),
ALL('Outbound Delivery') -- This removes all filters from the 'Outbound Delivery' table
)
And one more for percentage
Percentage_of_GT = DIVIDE(
[Shorted_Qty],
[GT_Ignoring_TopN],
0 -- This is the alternate result if the denominator is zero
)
Proud to be a Super User! |
|
@bhanu_gautam Your solution does not work.
I should have explained that Shorted Qty is result of demand minus actual.
In your solution you divided Shorted Qty by deman, which is not necessery.
In theory what needs to happend shorted qty needs to be divided with Shorted qty that ignores top n filter.
I should have tried to explain better in initial explanation.
You can see my solution that I posted. It should allow to understand how it works.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
90 | |
84 | |
70 | |
49 |
User | Count |
---|---|
141 | |
121 | |
112 | |
59 | |
58 |