Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi all,
I couldn't find a comprehensive answer to this question albeit googling quite a bit, so here goes:
I have a simple line chart built over the automatic date hierarchy, with the drilldown option enabled.
I would like to filter out from the chart the last incomplete date period, depending on the displayed hierarchy level.
For example, when viewing the chart on the daily level, I would like to display data only up to yesterday's date.
For weekly - up to last week. and so on.
I know how to do it in Tableau, but Power BI works differently and the pin hadn't completely dropped yet.
Ideally, I'd like to learn the answer to the following:
* What is the best practice to filter the last incomplete date? Using a calculated column? A measure?
* What modifications need to be made to allow it to work with a drill-down?
* Assuming both ways are viable (which might be wrong), what are the pros and cons of each way?
* In general, what do I need to take into account when creating a calculation with DAX that is supposed to behave in a certain way when changing levels?
I understand I'm asking for a lot here, I'd greatly appreciate an answer to just the first two bullets.
Thank you!
Amit
Hi @amit_s
You can manipulate your measure according to the hierarchy level by using the function "isinscope".
in my example I just returned 1,2,3 according to the level of the hierarchy, can you instead of it use your filters?
More information about is in scope here :
https://www.youtube.com/watch?v=DtOfcsS_pQw&t=218s
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly