Forum Discussion
Max date and value by date filter slicer (dinamic)
- 6 years ago
I got a new measure, It seems to give correct GT and correct values when view NUM_DPL. But when view by NUM_DOL and date , it does not show correct value, figuring out that
Total value = Calculate( sumx( ADDCOLUMNS( SUMMARIZE( data, data[NUM_DPL], "max_date", MAX( 'Date'[Date]), "Max_ID", max(data[NUM_DPL]) ), "_num", calculate( Max(data[VLR_SLD_TOT_CAL]), filter( (data), data[NUM_DPL]= [Max_ID] && data[DAT_REF]= ([max_date]) ) ) ) ,[_num] ) )
Why is the second visual you want to show both start and end date. In first time you want only end date.
Only max Date
var _max = max(date[date])
return
calculate(sum(table[total_cal]),table[date] = _max)
While you can use table date instead of date date. prefer calendar Date table.
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s.
Refer
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners/ba-p/890814
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p/881739
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
- caslus6 years ago
Helper I
Thak you for response amitchandak , but this not work.
Thake a look: Total in this case need be : 235.937,66
- amitchandak6 years ago
Super User
🤔, why only that row. If possible please share a sample pbix file after removing sensitive information.Thanks.
My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970- caslus6 years ago
Helper I
- Anonymous6 years agoNot applicable
I may be unclear on this, but if you are trying to find the date that matches your value for "Media 8 only max date" simply do a lookup function (using the format function where necessary) to look up the date just like you would with a Vlookup, then you can set that lookup measure as your filter parameter for the visual or the page.
- caslus6 years ago
Helper I
Thank you Anonymous , but I dont know how to do this. Could You show me ?