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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Find repetitive values over different months in different categories

Hi, 

I have a dataset simplified as below, and have a requirement to highlight repetitive amounts, per category per store.

How Can I do that with DAX please ? 

 

mazer_1-1624268520120.png

 

Your help is very appreciated, 

Thanks in advance

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

 

Picture2.png

 

Repeated ? : =
VAR currentvaluetotal = [Value Total :]
VAR currentmonth =
MAX ( Months[Index] )
VAR newtable =
FILTER (
ALL ( Sales ),
Sales[Store] = MAX ( Stores[Store] )
&& Sales[Category] = MAX ( Categories[Category] )
&& [Value Total :] = currentvaluetotal
&& RELATED ( Months[Index] ) < currentmonth
)
RETURN
IF ( ISFILTERED ( Months[Index] ), IF ( COUNTROWS ( newtable ) >= 1, 1, 0 ) )

 

https://www.dropbox.com/s/4ybuju3e2nvpuko/mazer.pbix?dl=0 

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

 

Picture2.png

 

Repeated ? : =
VAR currentvaluetotal = [Value Total :]
VAR currentmonth =
MAX ( Months[Index] )
VAR newtable =
FILTER (
ALL ( Sales ),
Sales[Store] = MAX ( Stores[Store] )
&& Sales[Category] = MAX ( Categories[Category] )
&& [Value Total :] = currentvaluetotal
&& RELATED ( Months[Index] ) < currentmonth
)
RETURN
IF ( ISFILTERED ( Months[Index] ), IF ( COUNTROWS ( newtable ) >= 1, 1, 0 ) )

 

https://www.dropbox.com/s/4ybuju3e2nvpuko/mazer.pbix?dl=0 

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

Anonymous
Not applicable

Hi @Jihwan_Kim 
Thank you for the solution,
I'm applying your solution to my datase, but in the last condition, I'm getting the condition: ISFILTERED ( Months[Index] ) = False .. Any thoughts or Ideas ?
Anonymous
Not applicable

Thanks a lot @Jihwan_Kim 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

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