Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
This should be really easy but I'm not getting it to work for reasons I can't figure out.
I have a dataset with different dates (DATE column) and I want to add a new column that puts a 1 on the rows with the max/last date on it otherwise 0.
Solved! Go to Solution.
Hi @dwel0120
Please try this measure:
Last Date =
VAR _MaxDate =
CALCULATE ( MAX ( FB_TOP_CONTRIBUTORS[DATE] ), ALL ( FB_TOP_CONTRIBUTORS ) )
RETURN
IF ( FB_TOP_CONTRIBUTORS[date] = _Maxdate, 1, 0 )
output:
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
Hi @dwel0120
Please try this measure:
Last Date =
Var _MaxDate = calculate(max(table[DATE],all(table))
return
if(table[date]=_Maxdate,1,0)
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
Hi @dwel0120
Please try this measure:
Last Date =
VAR _MaxDate =
CALCULATE ( MAX ( FB_TOP_CONTRIBUTORS[DATE] ), ALL ( FB_TOP_CONTRIBUTORS ) )
RETURN
IF ( FB_TOP_CONTRIBUTORS[date] = _Maxdate, 1, 0 )
output:
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
Thank you. That worked. I didn't see that I needed the ).
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 21 | |
| 11 | |
| 9 | |
| 5 | |
| 5 |