The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have this:
CalcLastWeek =
VAR GetDate =
CALCULATE( MAXX ('MyTable','MyTable'[Report Date]), ALLSELECTED('MyTable') )
RETURN
CALCULATE(
MAXX('MyTable','MyTable'[Report Date]),
FILTER(ALL('MyTable'),'MyTable'[Report Date]< GetDate)
)
Which does the job, but I need to remove the timestamp that is also displayed on the card.
I can't seem to find the correct place to put the FORMAT code.
Any help would be greatly appreciated. Thanks.
Solved! Go to Solution.
Hi @Pete_81 ,
You can update your measure like below if you want to handle formatting in measure itself:-
CalcLastWeek =
VAR GetDate =
CALCULATE (
MAXX ( 'MyTable', 'MyTable'[Report Date] ),
ALLSELECTED ( 'MyTable' )
)
VAR result =
CALCULATE (
MAXX ( 'MyTable', 'MyTable'[Report Date] ),
FILTER ( ALL ( 'MyTable' ), 'MyTable'[Report Date] < GetDate )
)
RETURN
FORMAT ( result, "MM/DD/YYYY" )
or you can change it explicitly from the top ribbon :
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @Pete_81 ,
You can update your measure like below if you want to handle formatting in measure itself:-
CalcLastWeek =
VAR GetDate =
CALCULATE (
MAXX ( 'MyTable', 'MyTable'[Report Date] ),
ALLSELECTED ( 'MyTable' )
)
VAR result =
CALCULATE (
MAXX ( 'MyTable', 'MyTable'[Report Date] ),
FILTER ( ALL ( 'MyTable' ), 'MyTable'[Report Date] < GetDate )
)
RETURN
FORMAT ( result, "MM/DD/YYYY" )
or you can change it explicitly from the top ribbon :
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @Pete_81 ,
You can simply click on the measure, in the ribbon on top, you would see a format and data type option: you can set the data type from Date-time to just date. Anf also can set the format from there.
Or else try this measure:
Measure= Format (Calclastweek, "dd/mm/yyyy")
Mark this as a solution if I answered your question. Kudos are always appreciated.
Thanks
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
21 | |
18 | |
16 | |
13 |
User | Count |
---|---|
41 | |
38 | |
24 | |
20 | |
20 |