Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I want to filter Column based on the selecte value from the Slicer, I have LastdayofMonth column and same as the slicer in Report canvas so when user select the date from slcier I want to filter selected Month along with the -12 Month from the selected Month, for example if the user select say 31/01/2021 then i need to filter the LastdayofMonth column for 31/12/2021 till 31/11/2020 I am using the below DAX as Measure but unable to get the final result. Please help.
IF (
ISFILTERED ( v_DM_Dim_date[LastDayOfMonth] ) && HASONEVALUE ( v_DM_Dim_date[LastDayOfMonth] ),
LASTNONBLANK ( v_DM_Dim_date[LastDayOfMonth], 0 ),
1)
Regards
Suhel
Solved! Go to Solution.
Hi @Suhel_Ansari ,
You can try to create a separate date table for the slicer.
Try this measure
Measure =
VAR StartDate =
EOMONTH ( SELECTEDVALUE ( DateTable[Date] ), 0 )
VAR EndDate =
EDATE ( EOMONTH ( SELECTEDVALUE ( DateTable[Date] ), -1 ), +12 )
RETURN
IF (
MAX ( 'MainTable'[Date] ) >= StartDate
&& MAX ( 'MainTable'[Date] ) <= EndDate
&& ENDOFMONTH ( 'MainTable'[Date] ) = MAX ( 'MainTable'[Date] ),
1
)
You can check more details from here.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Suhel_Ansari ,
You can try to create a separate date table for the slicer.
Try this measure
Measure =
VAR StartDate =
EOMONTH ( SELECTEDVALUE ( DateTable[Date] ), 0 )
VAR EndDate =
EDATE ( EOMONTH ( SELECTEDVALUE ( DateTable[Date] ), -1 ), +12 )
RETURN
IF (
MAX ( 'MainTable'[Date] ) >= StartDate
&& MAX ( 'MainTable'[Date] ) <= EndDate
&& ENDOFMONTH ( 'MainTable'[Date] ) = MAX ( 'MainTable'[Date] ),
1
)
You can check more details from here.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-pn Thank you for the Answer, it's works as expected. however i need a Solution without creating a Seperate Table can't we do it using only the Main Table. I need a solution for SSAS Model. Thanks
Hi,
Similar question answered here - Solved: Re: Calculate days past term need dropdown slicer. Hope this helps.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
94 | |
83 | |
67 | |
59 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |