Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.