Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Comparing data sets

I have extracts of a data set from Jan, Feb & March and I want to compare them to see increase/decrease across two months. I have added them into one tab, and created an identifying column as to whe...
  • v-lid-msft's avatar
    6 years ago

    Hi Anonymous ,

     


    We can create a measure and use it in condition format to meet your requirement.
    1. create a measure that calculate the difference of the [ABV] column in the same forecasted month.

     

    Measure = 
    var LastExactDate = 
    CALCULATE(
        Max('collated_Table'[Exacted_Date]),
        FILTER(
            ALLSELECTED('collated_Table'),
            collated_Table[Exacted_Date]<MIN('collated_Table'[Exacted_Date])&&'collated_Table'[Forecasted_Month] in DISTINCT('collated_Table'[Forecasted_Month])
            )
        )
    var LastABV = 
    CALCULATE(
        SUM('collated_Table'[ABV]),
        FILTER(
            ALLSELECTED(collated_Table),
            'collated_Table'[Exacted_Date]=LastExactDate&&'collated_Table'[Forecasted_Month] in DISTINCT('collated_Table'[Forecasted_Month])
            )
        )
    return 
    SUM(collated_Table[ABV]) – LastABV
    

     

     

    2. apply icon condition format with [ABV], and use measure in ‘Based on field’ 

     

     

    3. Then we can get the result like this,

     

     

    If it doesn't meet your requirement, Could you please show the exact expected result based on the Tables that you have shared?