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
Shackwell
Helper III
Helper III

Having data inconsistency when comparing two years

Hello,

 

I am trying to set a graphic showing how are expenses going monthly vs the prior year and I get complete inconsistency in my visual. Im currently comparing 2020 with 2021 and for the 2021 I am going to compare until June. Somehow when I try to put those 2 expenses together data from the 2021 shows info from July to Dec 2021 and it is not even captured there. Any help would be amazing.

 

Thank you,

6 REPLIES 6
Shackwell
Helper III
Helper III

Maybe I did something wrong with the relationship created between the data sets. All I wanted was a comparison between the 2 fiscal years. Current Fiscal Year should have info until June and the past fiscal year should have everything arranged by month. But a discrepancy happens and it seems to allocate resources from a different month and accumulating it by segment. What would be the measure recommended for this? Tried using slicers but have the same issue.

Icey
Community Support
Community Support

Hi @Shackwell ,

 

What's your fiscal year format? Could you change my sample data above to meet your scenario?

 

 

Best Regards,

Icey

amitchandak
Super User
Super User

@Shackwell , Can you share the measures you are using?

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Usually we can use time intelligence with date table

 

example

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))

 

Probably need to use that measure instead. I´ve been using slicers to compare data among the years. Anyways regarding the info I am posting you 3 images not sure if this can lead to the desired outcome. One of them is the year to be analyzed, the other is the joint graph that shows inconsistent data and the third is the prior year to be analized. If you should require additional info let me know. Thank you for your time. 

 

year to be analyzedyear to be analyzedboth years togetherboth years togetheryear - 1 to be analyzedyear - 1 to be analyzed

Icey
Community Support
Community Support

Hi @Shackwell ,

 

Is this what you want?

Measure =
IF (
    MAX ( 'Table'[Year] ) <> YEAR ( TODAY () )
        || (
            MAX ( 'Table'[Year] ) = YEAR ( TODAY () )
                && MAX ( 'Table'[MonthNo] ) <= 6
        ),
    1
)

compare.PNG

 

 

Best Regards,

Icey

 

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

I think my mistake was not using enough measures. Im going to try the 2 measures you stated to calculate time intelligence and I will let you know how it goes. Thank you for the support.

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.