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

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.

Comparison.PNG

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

 

 

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
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

 

30.png

 

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

 

31.png

 

3. Then we can get the result like this,

 

 

32.png

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

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lid-msft
Community Support
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

 

30.png

 

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

 

31.png

 

3. Then we can get the result like this,

 

 

32.png

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

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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!

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.