Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I have a relatively simple graph I'm trying to create using the following information as below:
Group | Customer ID | Old Rating | New Rating | Rating Difference | Downgrade/Upgrade |
Automotive | ABC1234 | 3 | 5 | 2 | Downgrade |
Automotive | ADX1234 | 1 | 6 | 5 | Downgrade |
Agriculture | BOD1234 | 4 | 2 | -2 | Upgrade |
Agriculture | SIP1234 | 2 | 2 | 0 | No Change |
Finance | TXN1234 | 5 | 2 | -3 | Upgrade |
Finance | POQ1234 | 9 | 10 | 1 | Downgrade |
Travel | QTR1234 | 4 | 1 | -3 | Upgrade |
Travel | POX1234 | 3 | 2 | -1 | Upgrade |
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:
Solved! Go to Solution.
@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]))
@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]))
User | Count |
---|---|
102 | |
91 | |
87 | |
79 | |
71 |
User | Count |
---|---|
113 | |
105 | |
101 | |
73 | |
65 |