Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
ukantkumar
Helper I
Helper I

DAX fORMULA

 

MY requirement I have to take some specific category and that also till this month (Actual Unit) from the given sample table.

because I have data from 2017 to 2023.

EX:- I have to take 2017 to Current month with only A  and B category(Actual Unit)

KALESH2.PNG

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @ukantkumar ,

 

You could add below measure into "Visual level filter" ad set its value to 1.

check =
IF (
    YEAR ( SELECTEDVALUE ( Test_5[DATE] ) ) <= YEAR ( TODAY () )
        && MONTH ( SELECTEDVALUE ( Test_5[DATE] ) ) <= MONTH ( TODAY () )
        && SELECTEDVALUE ( Test_5[category] ) IN { "A", "B" },
    1,
    0
)

1.PNG

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @ukantkumar ,

 

You could add below measure into "Visual level filter" ad set its value to 1.

check =
IF (
    YEAR ( SELECTEDVALUE ( Test_5[DATE] ) ) <= YEAR ( TODAY () )
        && MONTH ( SELECTEDVALUE ( Test_5[DATE] ) ) <= MONTH ( TODAY () )
        && SELECTEDVALUE ( Test_5[category] ) IN { "A", "B" },
    1,
    0
)

1.PNG

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
TomMartens
Super User
Super User

Hey,

 

can you please prepare some sample data in an Excel file, upload the file to onedrive or dropbox and share the link.

 

Please, provide an example what the expected result should look like.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.