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

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.

Reply
Anonymous
Not applicable

Matrix report trend value

 I have a matrix report which has following values. But , need to show trend as seperate ICON at the top of the Matrix report.

 

Trend should be Postive ,if All  are Zeros in the difference value

Trend should be Negative ,if any of the difference value having variation.

 

Can someone help me DAX how to achive trend value.

 

Example: The below scenerio ,Trend value is Negative since states 2,6 are having variation in the difference value.

 

                                                 TREND - NEGATIVE

   PowerBI.png

 

 

 

 

3 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , Try like

if(
countx(filter(summarize(Table, Table[state], "_1", sumx(Table, if(Table[source]-Table[Target]<0,1,0))),[_1]>0),[state]) >0, "Negative","Positive")

View solution in original post

@Anonymous , Data is grouped at the state level first and then filtered and then aggregated gain

View solution in original post

Anonymous
Not applicable

Thanks a lot. Its working perfect after making the changes as per my requriment. 

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , Try like

if(
countx(filter(summarize(Table, Table[state], "_1", sumx(Table, if(Table[source]-Table[Target]<0,1,0))),[_1]>0),[state]) >0, "Negative","Positive")
Anonymous
Not applicable

Thank,Amit. Its working somehow. But need to do through testing for my entire report. Can you please explain me this syantax what is happening here?

 

@Anonymous , Data is grouped at the state level first and then filtered and then aggregated gain

Anonymous
Not applicable

Thanks a lot. Its working perfect after making the changes as per my requriment. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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