Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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.
User | Count |
---|---|
85 | |
82 | |
66 | |
52 | |
48 |
User | Count |
---|---|
100 | |
49 | |
42 | |
39 | |
38 |