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 when they are from.

I dont know if this is the best practice, or if it should be kept on separate sheets?

 

Below is an extract of my collated data.

It shows that when it was extracted on 12th Jan that £75k had been secured for May 2020

Then as of 4th Feb, there had been £0 movement on this figure, yet as of March's extract, there had been £197k secured.

 

How can I compare the difference either positive or negative across differing months?

This data set has c. 30 column headers, so once I nail one comparison, I can then replicate it for the others

 

Thanks,

Chris

 

 

  • 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?

     

2 Replies

  • v-lid-msft's avatar
    v-lid-msft
    Community Support

    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?

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi v-lid-msft 

       

      I dont know how I planned to show this information!

      The solution you have provided, has provided me with a great method to show the difference.

       

      Thanks for your help!