cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shackwell
Helper I
Helper I

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 I
Helper I

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"))

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

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
Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Power BI Womens Summit 2021 768 x460.jpg

Interviews, learning sessions, allies, and more!

#PowerBIWomenSummit

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!