Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Graph Visualization Help: Showing only Decreases and Equal to 0

Hi,

 

I have a relatively simple graph I'm trying to create using the following information as below:

 

Group

Customer IDOld RatingNew RatingRating DifferenceDowngrade/Upgrade
AutomotiveABC1234352Downgrade
AutomotiveADX1234165Downgrade
AgricultureBOD123442-2Upgrade
AgricultureSIP1234220No Change
FinanceTXN123452-3Upgrade
FinancePOQ12349101Downgrade
TravelQTR123441-3Upgrade
TravelPOX123432-1Upgrade

 

However, stuck on knowing which DAX code to start with to create something similar to this:

 

The X-Axis will remain the same, with the difference being the Y-Axis.

How can I make the Y-axis utilise a count, so that I can show that:

  • 100% of all Automotive Customers were Downgrade;
  • 0% of all Agriculture were Downgrades;
  • 50% of all Finance customers were Downgrades;
  • 0% of all Travel customers were Downgrades 
  • Anonymous ,

    for visual

    new measure = divide((sumx(Table,switch(true(), [Rating]-[New Rating]>0,1, [Rating]-[New Rating]<0,-1,0)),count(Table[Customer]))

     

    or %

    Downgrade % = divide(countx(filter(table,Downgrade/Upgrade="Downgrade"),Table[Customer]) ,count(Table[Customer]))

    Upgrade % = divide(countx(filter(table,Downgrade/Upgrade="Upgrade"),Table[Customer]) ,count(Table[Customer]))

1 Reply

  • Anonymous ,

    for visual

    new measure = divide((sumx(Table,switch(true(), [Rating]-[New Rating]>0,1, [Rating]-[New Rating]<0,-1,0)),count(Table[Customer]))

     

    or %

    Downgrade % = divide(countx(filter(table,Downgrade/Upgrade="Downgrade"),Table[Customer]) ,count(Table[Customer]))

    Upgrade % = divide(countx(filter(table,Downgrade/Upgrade="Upgrade"),Table[Customer]) ,count(Table[Customer]))