Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi!
So i have data of App Sales for each platform, (A platform, B platform and C platform). I want to show the status of if the app is "Profitable" or "Unprofitable" based on their summation between sales in A and C platform. The status of the app will give an output "Profitable" like in A-22 App, Category B50B in August 2000, and "Unprofitable" for A-22 App, B51 Category in Oct 2000.
I'm planning to show the status with Card Visualization with the date slicer.
Here is the data i used. I'm really new to DAX so i would really appreciate if anyone also can show the code in DAX. Thankyou in Advance!
Sales Data
Solved! Go to Solution.
@Farrah24 try this one
Status = var _D = CALCULATE(max('Table'[Date]),ALLSELECTED('Table'[Date]))
return
if(CALCULATE(sum('Table'[Platform A Sales, USD]) + sum('Table'[Platform C Sales, USD]),'Table'[Date] = _D) = 0 ,"Unprofitable " & _D,"Profitable " & _D)
@Farrah24 Hi try by creating below measure for card visual.
measure = var _A = sum('Tablename'[Platform A Sales, USD])
var _B = SUM('Tablename'[Platform C Sales, USD])
var _S = _A + _B
return
if(_S = 0 ,"Unprofitable","Profitable")
Hi! Thanks for your reply!
I want to show the status dynamically with the last selected date in the slicer. I've tried to make slicer date in form of dropdown or list where it only have one value selected, and it work perfectly. But not when i have range of date, although i already make another measure to pick up last date selected its still not working. Here's the preview of my desktop, i also upload my pbix on last link. Thankyou in advance!
@Farrah24 try this one
Status = var _D = CALCULATE(max('Table'[Date]),ALLSELECTED('Table'[Date]))
return
if(CALCULATE(sum('Table'[Platform A Sales, USD]) + sum('Table'[Platform C Sales, USD]),'Table'[Date] = _D) = 0 ,"Unprofitable " & _D,"Profitable " & _D)
User | Count |
---|---|
139 | |
113 | |
103 | |
73 | |
63 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |