Forum Discussion
Keep Contest Filter after Caculate with Filter
Hi,
i've a measure defined like this:
The "Previous" term means SEASON - 10.
Now, if i want to add another detail level, like the Month, this is what i got:
The Measure won't split by month, i get the total instead.
Is there a way to use the Caculate function with the filter clause, but in the sametime maintain the context of the table ( or visual)
where the Measure is placed?
Thanks in advance for help,
Best Regards
--D
Hi LJAdmin ,
Try to modify your measure as below:
T_QTA_VENDUTA_SP = CALCULATE(SUM(DM_RETAIL_PRODUCTS[QTA_VENDUTO]),FILTER(ALL(DM_RETAIL_PRODUCTS),DM_RETAIL_PRODUCTS[STAGIONE_VENDITA]=MAX(DM_RETAIL_PRODUCTS[STAGIONE_VENDITA])+10))If the above doesnt work,could you pls upload your .pbix file to onedrive and share the link with us?Remember to remove the confidentail information.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
3 Replies
- AntrikshSharmaCommunity Champion
Use something like this:
= CALCULATE ( [Total Sales], DATEADD ( Dates[Date], -10, MONTH ) ) - amitchandakSuper User
LJAdmin , You can create rank for the session. and Use that. But create a separate session table
This Session = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Session Rank]=max('Date'[Session Rank])))
Last Session = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Session Rank]=max('Date'[Session Rank])-1))Something very smiliar to
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123 - v-kelly-msftCommunity Support
Hi LJAdmin ,
Try to modify your measure as below:
T_QTA_VENDUTA_SP = CALCULATE(SUM(DM_RETAIL_PRODUCTS[QTA_VENDUTO]),FILTER(ALL(DM_RETAIL_PRODUCTS),DM_RETAIL_PRODUCTS[STAGIONE_VENDITA]=MAX(DM_RETAIL_PRODUCTS[STAGIONE_VENDITA])+10))If the above doesnt work,could you pls upload your .pbix file to onedrive and share the link with us?Remember to remove the confidentail information.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!