Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Good Day,
I have an issue where a DAX formula is not ouputting correctly. Essentially I wrote formulas to calculate the value difference of items from a previous month, which ouputs correctly. Now I want to filter on the MAX selected date (wrote this in DAX) for those values but it does not work.
1. The matrix output on the far left is correct
2. The table output in the middle via a DAX filter does not work ([Latest Month], [Date Checker]) Code can be found in PowerBI file
3. The table output on the right (manual filter) works perfectly.
I'm not sure where the formula is breaking.I believe it is somewhere along the lines because of the relationship between the two tables in PowerBI.
Let me know if I need to furnish more details.Please find the links to the excel base data and Power BI File that may assist.
Excel - https://www.dropbox.com/s/ifqq493hvw781ub/Test.pbix?dl=0
PowerBI - https://www.dropbox.com/s/8cmm6vpbpxwh0bo/Test.xlsx?dl=0
@yoshlin , Not checked your file. But you can have measure like ?
measure =
var _max = maxx(allselected(Date), Date[Date])
return
calculate([Value measure], filter(Date,Date[Date]= _max))
Hi @amitchandak,
Slightly confused on the [Value measure] syntax - is that self-referencing ?
I tried to do it this way to get my latest month to run a filter but it does not work.
@yoshlin , Try like
measure =
VAR CurrentYearMonth = MAXX(ALLSELECTED('tertiary vw_insights_ageing_profile'),'tertiary vw_insights_ageing_profile'[Date Link])
Return
IF(format(max('tertiary vw_insights_ageing_profile'[Date Link]),"YYYYMM") = format(CurrentYearMonth,"YYYYMM"),1,0)
You can use today() in place of MAXX(ALLSELECTED('tertiary vw_insights_ageing_profile'),'tertiary vw_insights_ageing_profile'[Date Link]) , if needed
I've written it exactly as you typed and it is unfortuantely still not working.
Perhaps the attached PBI file might be of some use ?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
18 |