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
Hi
Does anyone know why this DAX doesnt work...
Example of my data table below:
Solved! Go to Solution.
So, the way that I would do this in a measure would be something along the lines of:
Prior Week =
VAR __PreviousWeek = MAX('FactNELWeekly'[Previous Week No.])
RETURN
CALCULATE([UAP's],FILTER('FactNELWeekly'[Week] = __PreviousWeek)
Solved:
Hi @Anonymous ,
Based on @Greg_Deckler 's suggestion,the measure needs to be corrected as below:
Prior Week =
VAR __PreviousWeek = MAX('FactNELWeekly'[Previous Week No.])
RETURN
CALCULATE([UAP's],FILTER('FactNELWeekly','FactNELWeekly'[Week] = __PreviousWeek) WoW=[UPA's]-_PreviousWeek
Hi Kelly @v-kelly-msft
I have an additional question on this topic, everything works with the DAX above, so thanks againn for that. But im noticing there's a week 0 appearing, and actually I've replicated this for a monthly report and again, im getting a 0 month. Is there a way to take care of this scenario within the same Dax formula? I figured it would be linked to this formula, hence why im posting here.
I'm googling this now acutally, but thought i'd try my luck here at the same time :).
Thanks
Ben
thank you so much!
this did the trick nicely, really appreciated!
Thanks @v-kelly-msft ! That's what happens when I don't actually test my DAX, I mess up some syntax!
So, the way that I would do this in a measure would be something along the lines of:
Prior Week =
VAR __PreviousWeek = MAX('FactNELWeekly'[Previous Week No.])
RETURN
CALCULATE([UAP's],FILTER('FactNELWeekly'[Week] = __PreviousWeek)
Thank you so much, this worked!
Much appreciated.
HI,
It could be something like this (if it's a calculated column):
var previousWeek = FactNELWeekly[Previoud Week No.]
return
CALCULATE([UAP's],FactNELWeekly[Week No.] = previousWeek)
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.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 40 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |