Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

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:

rlee2838_0-1594601695632.png

 

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 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@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]))

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@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]))

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.