Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Monthly % Change visual - Function

Hey guys,

 

I'm trying to create a visual that indicates whether an increase or decrease has occured to a variable compared to the previous month. If an increase has occured, I would like a green upright arrow to show. If a decrease has occured, a red downward arrow, and if no change has occured, yellow horizontal bar. Ofcourse, alongside this visual should be the % change. 

 

I'm trying apply this using the results from the following function. See below:

 

Waste Diverted Percentage =
VAR TotalWasteDisposal =
CALCULATE(SUM('Contractor Monthly Report Data'[Quantity Measurement Adjusted]),'Contractor Monthly Report Data'[Waste Group] = "Waste Disposal")

VAR TotalWasteDiverted =
CALCULATE(SUM('Contractor Monthly Report Data'[Quantity Measurement Adjusted]),'Contractor Monthly Report Data'[Waste Group] = "Waste Diverted")

VAR Waste_Efficiency = TotalWasteDiverted/(TotalWasteDisposal+TotalWasteDiverted)
return IF( ISBLANK( Waste_Efficiency) , 0, Waste_Efficiency )
 
Not sure how to progress with this. 
 
Thanks
 

 

 

 

 

 

 

 

 

 

 

 

 

4 Replies

  • NewbieYR's avatar
    NewbieYR
    Frequent Visitor

    Looks like we are in the same business 🙂

     

    Right click the Values and select Icon in Conditional formatting. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      I want to create a card visual and display the percentage change and icon. Won't I need to create a new function/measure to get the values out of the above DAX Function first?

      • NewbieYR's avatar
        NewbieYR
        Frequent Visitor

        If you already have a datetable you can do time intelligence calculation through quick measure to get M2M % change. Your result will be a -/+ %, and you can add a conditional formatting to it.

         

  • v-zhangti's avatar
    v-zhangti
    Community Support

    Hi, Anonymous 

     

    Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures. I look forward to your response.

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.