Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi All
I have posted below question :-
https://community.powerbi.com/t5/Desktop/How-to-hide-22-07-column/td-p/2671064
Can some one share with me how to dynamic flag YrMth ?
when now is 29 July 2022 , i will like to filter Jan till June , not include July.
when now is 1 Aug 2022 , i will like to filter Jan till July , not include Aug.
Need to use some thing month_n = 1
Paul
Solved! Go to Solution.
Hi @admin11
you can create a filter measure
IF ( Month ( MAX ( 'Date'[Date] ) ) < MONTH ( TODAY ( ) ), 1 )
Place it in the filter pane of the matrix visual, select "Is" and inser the value "1" then apply the filter.
I have try your expression , when click on apply , it will filter off all date .
Hope you can help to take a look where go wrong ?
Paul
Apprecaite your help, Thank you very much. Since today 1 Aug , i don;t have any data in yet , so i am not able to test the expression it is working fine.
By the way i just like to know that , if i need to dynamic filter last 2 month ago data off :-
Paul
While doing such calculations please pay attention to the year as well. If today is for example Jan 15 then the previous month do not equal 1 -1 = 0 or the month before 1 - 2 = -1. In this case you need to have a year-month sequential number column in your date table. Which is a dense ranking of the year-month number. Then we can comfortably use this column to retun the n previous months.
Thank you for supper fast response. I she'll wait for Aug data come in . From you reply you mention that I need to make use YrMth field . Can you pls share the expression with me .
@admin11 , Create a new column in the date table
if([Date] >= (eomonth([Date], -1*Month([Date])) + 1) && [Date] <= eomonth([Date],-1) ,1,0)
i Have try your expression.
when i activated , it will filter off all date.
Hope you can give me advise.
Paul
User | Count |
---|---|
102 | |
90 | |
80 | |
71 | |
69 |
User | Count |
---|---|
113 | |
99 | |
97 | |
72 | |
68 |