Forum Discussion

efilipe's avatar
efilipe
Helper IV
8 years ago
Solved

Table LatDayAndroid and LastDayiOS

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 SODaily Device InstallsDaily Device UninstallsDaily Device UpgradesTotal User InstallsDaily User InstallsDaily User Uninstalls
Active Device Installs
21/07/2017 Android1001101
22/07/2017 Android0001001
23/07/2017 Android0001001
24/07/2017 Android0111010
25/07/2017 Android0001000
26/07/2017 Android1030111037
27/07/2017 Android13372413317
29/07/2017 iOS22      
30/07/2017 iOS18      
31/07/2017 iOS75      
01/08/2017 iOS90      
02/08/2017 iOS58      
03/08/2017 iOS44      
04/08/2017 iOS48      
05/08/2017 iOS27      
06/08/2017 iOS20      
07/08/2017 iOS36      
08/08/2017 iOS56      
          
  • efilipe

     

    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

10 Replies

  • 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;