Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
This should be simple but can't see how to format a date in a measure. This measure works fine except it give me a date/time format. And all I want is a MM/DD/YYYY format:
Right now it is showing: Between 2020/05/30 12:09:42 AM
I want it to show: Between 5/30/2020
"Between "&
(CALCULATE(AVERAGEX(prd_f_GW_Stats,prd_f_GW_Stats[TubeUsage1]),FILTER(prd_f_GW_Stats,prd_f_GW_Stats[LRFlag]="NLR"))-
CALCULATE(AVERAGEX(prd_f_GW_Stats,prd_f_GW_Stats[TubeUsage1]),FILTER(prd_f_GW_Stats,prd_f_GW_Stats[LRFlag]="LR")))/
CALCULATE(AVERAGEX(prd_f_GW_Stats,prd_f_GW_Stats[Burn Rate]),FILTER(prd_f_GW_Stats,prd_f_GW_Stats[LRFlag]="LR"))
+
Today()
Solved! Go to Solution.
Works for me...
Try...
Measure = "Between " & FORMAT ( ( CALCULATE ( AVERAGEX ( prd_f_GW_Stats, prd_f_GW_Stats[TubeUsage1] ), FILTER ( prd_f_GW_Stats, prd_f_GW_Stats[LRFlag] = "NLR" ) ) - CALCULATE ( AVERAGEX ( prd_f_GW_Stats, prd_f_GW_Stats[TubeUsage1] ), FILTER ( prd_f_GW_Stats, prd_f_GW_Stats[LRFlag] = "LR" ) ) ) / CALCULATE ( AVERAGEX ( prd_f_GW_Stats, prd_f_GW_Stats[Burn Rate] ), FILTER ( prd_f_GW_Stats, prd_f_GW_Stats[LRFlag] = "LR" ) ) + TODAY (), "M/d/yyyy" )
Instead of applying format in the measure formula, you could apply format in model.
With measure highlighted.
Go to "Modeling" tab, and use "Format:" drop down. Apply formatting of your choice.
This worked for me, thanks!
That doesn't work because this measure is part text and part date
Ah I missed that part. Then nest the date portion in FORMAT()
Ex: FORMAT(TODAY(),"M/d/yyyy")
I tried that but I got an error
Works for me...
Try...
Measure = "Between " & FORMAT ( ( CALCULATE ( AVERAGEX ( prd_f_GW_Stats, prd_f_GW_Stats[TubeUsage1] ), FILTER ( prd_f_GW_Stats, prd_f_GW_Stats[LRFlag] = "NLR" ) ) - CALCULATE ( AVERAGEX ( prd_f_GW_Stats, prd_f_GW_Stats[TubeUsage1] ), FILTER ( prd_f_GW_Stats, prd_f_GW_Stats[LRFlag] = "LR" ) ) ) / CALCULATE ( AVERAGEX ( prd_f_GW_Stats, prd_f_GW_Stats[Burn Rate] ), FILTER ( prd_f_GW_Stats, prd_f_GW_Stats[LRFlag] = "LR" ) ) + TODAY (), "M/d/yyyy" )
Yep got it to work now! thanks.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
67 | |
51 | |
38 | |
26 |
User | Count |
---|---|
88 | |
52 | |
45 | |
39 | |
38 |