Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Your file has been submitted successfully. We’re processing it now - please check back in a few minutes to view your report.
10-08-2020 07:39 AM
Objective:
We would always like to retain profitable customers, Those who give High Margin. And If there are buying less discounted items, that would be best.
Important Measures
Discount % = DIVIDE(Sum(Sales[Discount]),sum(Sales[Gross Sales]))
Margin % = DIVIDE([Margin Amount],sum(Sales[net sales]))
Best Customer – Margin% >= Over All Margin % , Discount % <= Over All Discount %
Good Customer - Margin% >= Over All Margin % , Discount % > Over All Discount %
Bad Customer - Margin% < Over All Margin % , Discount % <= Over All Discount %
Worst Customer - Margin% < Over All Margin % , Discount % < Over All Discount %
We would plot these customers on the scatter visual and color based on the above logic. So let us have a color measure
Color Dot =
var _avgDisc = CALCULATE([Discount %],ALL(Sales))
var _avgMargin = CALCULATE([Margin %],ALL(Sales))
return switch(TRUE(),
[Margin %]>=_avgMargin && [Discount %] <=_avgDisc , "Green",
[Margin %]>=_avgMargin && [Discount %] >_avgDisc , "Blue",
[Margin %]<_avgMargin && [Discount %] <=_avgDisc , "Yellow",
[Margin %]<_avgMargin && [Discount %] >_avgDisc , "Red", "Black")
eyJrIjoiNGNjNjczNTEtMDFlOS00NDBiLTk1MTAtY2Y1OGY5OWYyMjFlIiwidCI6ImVhOGJkMWZkLWFjMzQtNGFlMi1iNDIxLTZjZmEyZmNmZjI0MyJ9