Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I am a bit lost concerning the use of MAX with dates. I thought it would be possible to use a dynamic max date and then combine it with a calculate revenue function.
Here is my issue:
I need a measure that takes into account only the freshest date in my data set. So in this case, for project release it needs to return only the revenue for the 2nd of December 2020. But filtering my revenue with the max date delivers an error.
I am still new at DAX and getting confused by all the possibilities. How should I approach this?
Thanks!
Pauline.
Solved! Go to Solution.
@Berl21
I made a sample file with the solution, please check the attached file,
The measure [Total Units by Max Date ] should work for you
Total Unitd by Max Date =
IF(
ISINSCOPE('financials'[Date]),
VAR __MAXDATE = CALCULATE( MAX('financials'[Date]) , ALLSELECTED(financials[Date] ))
RETURN
IF( MAX('financials'[Date]) = __MAXDATE , [Total Units] ),
[Total Units]
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi @Berl21 ,
Is your problem solved? If so, would you mind accept the helpful replies as solutions? Then we are able to close the thread. More people who have the same requirment will find the solution quickly and benefit here, thank you!
Best Regards,
Community Support Team _ kalyj
@Berl21
I made a sample file with the solution, please check the attached file,
The measure [Total Units by Max Date ] should work for you
Total Unitd by Max Date =
IF(
ISINSCOPE('financials'[Date]),
VAR __MAXDATE = CALCULATE( MAX('financials'[Date]) , ALLSELECTED(financials[Date] ))
RETURN
IF( MAX('financials'[Date]) = __MAXDATE , [Total Units] ),
[Total Units]
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
User | Count |
---|---|
42 | |
28 | |
23 | |
18 | |
16 |
User | Count |
---|---|
54 | |
35 | |
18 | |
18 | |
15 |