Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello, need your help !
I managed to make a percetage of total sales : "% Venta" for each store (code_store).
This uses one table named SalesPOS
Then I wanted to add a lookup table to get the name of the store (Nombre_Local) , the relationship works perfectly.
But when i add the StoreName from the Lookup table (Locales), the precentage breaks and I get duplicated values :
This is how the Metrics are calculated :
Overall Sales = CALCULATE(
[Sales Amount],
ALL('SalesPOS (noOLD)'[code_store]
))
Sales Amount = SUM('SalesPOS (noOLD)'[total])
% Venta = DIVIDE ( 'SalesPOS (noOLD)'[Sales Amount], 'SalesPOS (noOLD)'[Overall Sales],0)
Any ideas what AM I doing wrong ?
Thank you!
Solved! Go to Solution.
Hi @FcoArturo ,
Two methods:
1 Change the measure
Overall Sales =
CALCULATE(
[Sales Amount],
ALLSELECTED('Locales')
)
2 Change the relationship's crossfilter direction to both.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @FcoArturo ,
Two methods:
1 Change the measure
Overall Sales =
CALCULATE(
[Sales Amount],
ALLSELECTED('Locales')
)
2 Change the relationship's crossfilter direction to both.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
To your visual, ensure that the Code_Store field is also dragged from the Locales table.
Try this change:
Overall Sales =
CALCULATE(
[Sales Amount],
ALL( 'Locales' )
)