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.
Hi ,
I have an issue with card visual where Rev Difference is not showing correct values after customer name is excluded from table visual.
Correct data
Incorrect data is displayed after removing customer name and now it is showing 30 M instead of 51 million
Could you please suggest if there is any alternative solution or formula to show correct values in card visual.
I am available to proivde further details and thanks for your support
Regards,
Bhaskar
Solved! Go to Solution.
yes, here it is
https://drive.google.com/drive/folders/1FHc79P-25eVq8-K2a5c4uoPJ0_5wa6-w?usp=sharing
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
This reply is for @bhaskarpbi999
A quick feedback after checking the file, I hope I am not repeating other supporters argument
The problem disappears is you remove the filter on the value 1 for measure GR FlagM
If I put in The Customer again, you will see that that there are rows where the measure results into 0 but totals are identical to before
Those rows are responsible for the difference you see when you still have the filter on the measure in place for value 1 like this (notice the total decsreases as now the customers for which the measure returns 0 are excluded)
and now you remove the customer: there is no reasos anymore to exclude any customer from the calculation and so you get again 7638 (the filter on the measure is still in place)
That said, why is there that filter on that measure? What is the purpose of this filter? So I think we need to find a different solution to obtain the purpose you will explain, otherwise you will always get different results when you have or not the customer in the visual (in rows) as that defines the granularity at which the measure is calculated and therefore under which condition a customer is excluded (depending on the measure result for that customer, 1 or 0
hope I provided some guidance, I hope to be able to solve this entirely
PS I know it is easier when you get in after many have tried, so if I got something new I do not want to take too much merit. If I simply went back on something already discussed, well I apologize .-)
@MasonMA thanks for calling me in
Please let me know!
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Hi Bergamasch.
I needs GR flagM measure as a slicer filter but we can"t use measure as a filter.
So if I need to use GRFlagM in slicer I have defined that logic.
But my client wants to filter and use RevDiff measure in charts with different dimensions but when use them like month wise and market segment wise not getting right numbers and I have issue to filter growing flag.. Thanks for your extreme support
It is enough the Force that measure to go one Customer at a time, I will fix it after dinner, ok?
Hi FBergamaschi,
Thanks and kudos for your support
Regards,
Bhaskar
Hi @bhaskarpbi999,
can you specify what is the nature of the measure GR Flag M, I need to reproduce that behaviour in another way
Thanks
Hi FBergamaschi,
I have created GR FLagM bco'z i cant use the measure logic IF([Rev cy] > [Rev Ly], 1, 0) and use it directly in slicer due to power BI feature restriction.
I used GR FlagM measure and filtering it using GR flag slicer which is number column from Flag slicer table and specified the logic in the below formula.
Is this answer what you were looking for ?
If it is, I can share the file so you check in detail
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Hi @bhaskarpbi999 and @MasonMA,
while I was waiting for a feedback on the neture of the measure used as a filter, I tought to sove it differently
Now I have a file in which I implemented the new logic, where can I upload it so you can test it?
Here how it works now, a few screenshots
The totals stay correct if I remove the Customer:
With the flag on zero:
and still same totals if I remove the Customer
Is this what you were looking for?
Best
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Hi FBergamaschi,
Thanks and kudos for your support.
I have replied about the behavior of GRFlagM but i have seen yourolution solution post and i am expecting the same result after customer name is removed.
Could you please share the test .pbix so that i can check it and see if it works fine with sclicer filter.
Thanks in Advance for your immense support.
Regards,
Bhaskar
yes, here it is
https://drive.google.com/drive/folders/1FHc79P-25eVq8-K2a5c4uoPJ0_5wa6-w?usp=sharing
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Hi
Thanks and kudos for your support.
Hi @MasonMA,
i can check this but I have no access to the link where the pbix was shared
https://drive.google.com/file/d/1H8NAIdUEQf2mEb6ZpAONztJOX38d9ZDB/view?usp=drivesdk
I hope I get authorized and shall try to help @bhaskarpbi999 can you please authorize me?
meanwhile I try to figure out the issue in all these messages
Best
F
Hi @bhaskarpbi999,
Thank you for reaching out to the Microsoft fabric community forum.
The issue you are facing is happening because your current Rev Diff calculation is using either VALUES() or a row-level context logic that works fine when Customer Name is part of the visual. But when you remove Customer Name like in a card visual, the calculation behaves differently and results in an incorrect total.
To fix this, you can modify the measure to remove the customer-level filter while still calculating the correct sum.
I tested it with my sample data, and it worked fine. Please find the attached screenshot and Pbix for your reference.
Hope the above provided information help you resolve the issue, if you have any further concerns or queries, please feel free to reach out to us.
Regards,
Harshitha.
You really should have validated your results before you post it... This is from your file and your 'Rev Diff Correct' measure returns 32M? I'm terrified..
Hi @MasonMA,
Apologies for the confusion earlier, and thank you for pointing it out.
I reviewed the issue again, and you are right the previous explanation was incorrect. @bhaskarpbi999 Please consider the below updated explanation as the correct one.
I have implemented the fix for the Rev Difference measure so that the card visual now calculates the correct total, even when the Customer Name dimension is excluded.
The result matches the sum of the customer-level differences shown in the table visual, as expected.
For your reference, I’m attaching a .pbix file.
Thank you
I have tried with slicer but if i remove customer name and the value is not changing as per selection.
Could you please suggest any alternate solution or formual for this issue.
Regards,
Bhaskar
Hi, based on your pictures, could you enable 'Bi-directional Filtering' ? (even though it's not recommended at model level, it might be a simpler solution. )
What i see from your pictures is when the visual doesn’t include Customer Name, the context from AccountParent doesn’t propagate down to DWH_ADJ table.
If you wouldnt want to change the filtering direction, you may try with TREATAS as below. Again without looking at your pbix file and data validation, i cannot guarantee it works 100%
Rev Diff FIXED =
VAR Customers =
VALUES('AccountParent'[Customer Name])
RETURN
SUMX(
TREATAS(Customers, 'AccountParent'[Customer Name]),
CALCULATE([Rev CY]) - CALCULATE([Rev LY])
)
Please let me know if it works, thanks.
Hi MasonMA,
I have implemented the suggested formula but some how it's not working.
The issue when we ahve customer name with GR Flag slicer applied the value is 2169.
After removing customer name the value is 1984 and GR flag slicer also not working
Could you please help if i can modify formula to get the value for Rev CYand LY.
I have prepeared .pbix file with sample data but some how unable to upload file.
Regards,
Bhaskar
User | Count |
---|---|
87 | |
84 | |
36 | |
35 | |
30 |
User | Count |
---|---|
96 | |
74 | |
67 | |
52 | |
51 |