Forum Discussion

Nspiler's avatar
Nspiler
Frequent Visitor
1 year ago

Icon measure does not filter on date properly

I created the following measure based on a metric actual (%) against a goal (%) to help identify text that would show me what arrow color I need for conditional formatting:

 

Icon =
   
    CALCULATE(if('ALL DATA'[Sum of met]>='GOALS'[Sum of goal],"DownArrowRed","UpArrowGreen")
               
        )
The problem is that when I narrow via my month slicer, the data fields filter but not the measure.  So if I select July and August the data fields fill in for those months but the measure shows in all months.
 
This was my work around because I could not figure out a measure that woudl easily identify that actual metric of 6% against a goals of less than or equal to 12% was a green up arrow.

2 Replies

  • Hi Nspiler 

     

    It appears there are no relationships between the two tables on the month/date/period columns. Is there a dimension table that bridge the two tables?  If there is, it could be the measures themselves, it could be something else. There's just not information to figure what's wrong.  Please refer to this sticky post on how to get answers quickly https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Nspiler ,

    Please try the code below.

     

    Icon = 
        CALCULATE(
            IF(
                SUM('ALL DATA'[Sum of met]) >= SUM('GOALS'[Sum of goal]),
                "DownArrowRed",
                "UpArrowGreen"
            ),
            FILTER(
                'ALL DATA',
                'ALL DATA'[Date] IN VALUES('Calendar'[Date])
            )
        )

     

    If this reply still not help you get the expected result, please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:

    How to provide sample data in the Power BI Forum

    And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community.

    How to upload PBI in Community

    Thanks for your understanding. Your time and cooperation are much valued by us. We are looking forward to hearing from you to assist further.

    Best regards,

    Lucy Chen

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