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.
I am trying to create the below visual;
I have implemented this DAX, and it will not bring back the correct figures?
Total Installs Yesterday - iOS = CALCULATE([Total Installs],dateadd(DateDimension[Date],-1,DAY))
Total Installs Previous Day - iOS = CALCULATE([Total Installs],dateadd(DateDimension[Date],-2,DAY))
I have even tried the below;
Yesterday iOS = CALCULATE(SUM('iOS - App Units'[Installations]),PREVIOUSDAY('iOS - All App Units'[Date]))
I ahve tried with both a Dimdate and the date in the table.
And this also comes back with the incorrect number, I have a visual with the total installs with a filter on it so I know what figure I should be getting back;
Thanks
Solved! Go to Solution.
Hi, @Anonymous
Based on your description, I assume that you want to calculated the installs yesterday and the installs the day before yesterday. I created data to reproduce your scenario.
Table:
You may create measures as below.
Yesterday =
CALCULATE(
SUM('Table'[Installs]),
FILTER(
ALLSELECTED('Table'),
'Table'[Date]=TODAY()-1
)
)
The day before yesterday =
CALCULATE(
SUM('Table'[Installs]),
FILTER(
ALLSELECTED('Table'),
'Table'[Date]=TODAY()-2
)
)
Today is 6/26/2020. Here is the result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
Based on your description, I assume that you want to calculated the installs yesterday and the installs the day before yesterday. I created data to reproduce your scenario.
Table:
You may create measures as below.
Yesterday =
CALCULATE(
SUM('Table'[Installs]),
FILTER(
ALLSELECTED('Table'),
'Table'[Date]=TODAY()-1
)
)
The day before yesterday =
CALCULATE(
SUM('Table'[Installs]),
FILTER(
ALLSELECTED('Table'),
'Table'[Date]=TODAY()-2
)
)
Today is 6/26/2020. Here is the result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
This formula is not correct Yesterday iOS = CALCULATE(SUM('iOS - App Units'[Installations]),PREVIOUSDAY('iOS - All App Units'[Date])): PREVIOUSDAY Function works better with your DateDimension Table.
Did you create a Day Column in your DateDimension Table? if yes then try using PREVIOUSDAY function in your other 2 measures instead of DATEADD!
Maybe a Dummy Pibx file could help better understand your issue.
Regards
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
@Anonymous , Do with Date table only.
Mark your date dimension as date table.
Check does date has timestamp. Change datatype to datetime, choose a format to see time. If it has time then create date column join that with date table
New date = Table[Date].Date
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 |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
144 | |
109 | |
108 | |
88 | |
61 |