Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi guys,
I want to add two columns. First one with the MAX day for Android and second Max day for iOS. And set that column with 1 (true) and 0 (false);
Date | SO | Daily Device Installs | Daily Device Uninstalls | Daily Device Upgrades | Total User Installs | Daily User Installs | Daily User Uninstalls | Active Device Installs | |
21/07/2017 | Android | 1 | 0 | 0 | 1 | 1 | 0 | 1 | |
22/07/2017 | Android | 0 | 0 | 0 | 1 | 0 | 0 | 1 | |
23/07/2017 | Android | 0 | 0 | 0 | 1 | 0 | 0 | 1 | |
24/07/2017 | Android | 0 | 1 | 1 | 1 | 0 | 1 | 0 | |
25/07/2017 | Android | 0 | 0 | 0 | 1 | 0 | 0 | 0 | |
26/07/2017 | Android | 10 | 3 | 0 | 11 | 10 | 3 | 7 | |
27/07/2017 | Android | 13 | 3 | 7 | 24 | 13 | 3 | 17 | |
29/07/2017 | iOS | 22 | |||||||
30/07/2017 | iOS | 18 | |||||||
31/07/2017 | iOS | 75 | |||||||
01/08/2017 | iOS | 90 | |||||||
02/08/2017 | iOS | 58 | |||||||
03/08/2017 | iOS | 44 | |||||||
04/08/2017 | iOS | 48 | |||||||
05/08/2017 | iOS | 27 | |||||||
06/08/2017 | iOS | 20 | |||||||
07/08/2017 | iOS | 36 | |||||||
08/08/2017 | iOS | 56 | |||||||
Solved! Go to Solution.
Hi, ok. Try with this measures
LastDayAndroid = IF ( Table1[Date] = CALCULATE ( MAX ( Table1[Date] ), FILTER ( ALL ( Table1 ), Table1[SO] = "Android" ) ), 1, 0 )
To IOS change "Android" to "IOS"
Regards
Victor
Hi @efilipe,
You may try this calculated field formula
=if(CALCULATE(MAX(Data[Date]),FILTER(Data,Data[SO]=EARLIER(Data[SO])))=Data[Date],1,0)
Hope this helps.
That means that the column "LastDayAndroid" will have value "1" on the line 27/07/2017 and all other "Android" will have 0;
And iOS "LastDayiOS" will have "1" on the line 08/08/2017 and all other iOS lines will have 0;
Hi @efilipe,
Please try the solution other members posted, and mark the right or helpful reply as answer, so more people like will find workaround easily. After I test, all the formulas will return your expected result. Please feel free to ask if you haven't resolved it.
Best Regards,
Angelia
try this
Max Flag = var maxDate = Calculate(Max(iOS[Date]), AllExcept(iOS, iOS[SO]) ) return if(maxDate = max(iOS[Date]), 1, 0)
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Ashish_Mathurwhat is calculated field means? Calculated column or measure?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @parry2k,
It measns measure.
Thanks for the clarification because calculate field can be very confusing , that is why I asked.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi, ok. Try with this measures
LastDayAndroid = IF ( Table1[Date] = CALCULATE ( MAX ( Table1[Date] ), FILTER ( ALL ( Table1 ), Table1[SO] = "Android" ) ), 1, 0 )
To IOS change "Android" to "IOS"
Regards
Victor
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
95 | |
94 | |
80 | |
71 | |
64 |
User | Count |
---|---|
120 | |
105 | |
99 | |
81 | |
72 |