cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: DAX fORMULA

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
Highlighted
Super User III
Super User III

Re: DAX fORMULA

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
Highlighted
Microsoft
Microsoft

Re: DAX fORMULA

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

Helpful resources

Announcements
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors