Forum Discussion
Max date and value by date filter slicer (dinamic)
The archive : https://transfernow.net/215t88x2cpeh
15129 05/09/2019 138.435,19
15366 05/09/2019 95.596,61
----- ------------ 234.031,80
----- ----------- 234.459,53
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] ) )
15 Replies
- amitchandak
Super User
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-functionsAppreciate 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- caslus
Helper I
Thak you for response amitchandak , but this not work.
Thake a look: Total in this case need be : 235.937,66
- amitchandak
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