Forum Discussion
Power BI DAX
I encountered an issue with calculating the ratio in RLS. When RLS is enabled, the ratio calculation does not work correctly. To work around this problem, I created a separate table to calculate the sales ratio and linked it to a date table. However, the result is not correct. The amount 'Prélevement'[Facial] calculation is correct, but the ratio is incorrect. I tried multiplying the result by 100 to obtain the ratio as a percentage, but without success. Here is the measure used:
Could you help me identify where the problem lies and how to correct the ratio calculation?
Ratio =
SUMMARIZE(
'Prélevement',
'Prélevement'[Date Opération],
'Prélevement'[Cd Dist],
'Prélevement'[Distrib],
'Prélevement'[Facial],
"Total Ventes", SUM('Prélevement'[Facial]),
"Total Qte", SUM('Prélevement'[Qte Livree]),
"Ratio Vente", DIVIDE(SUM('Prélevement'[Facial]),CALCULATE(SUM('Prélevement'[Facial]),ALL('Prélevement')))*100)
RedaBi Please create a new thread. Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523