cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Comparing Month Year Across Different Years in the KPI Visual

Hello all! 

 

I am having trouble comparing different years in the KPI visual. When I select Month and Years that are in the same year, the KPI visual shows the current information as shown in this screenshot. 

 

1jxYxUe.png

 

 

However, when comparing Month Years that go across different years (2019 vs. 2020), the KPI visual only shows data for 2020. 

 

C9jpQDM.png

 

I have the trend axis set to Year. Is there a way for me to add something like a "Century" column in my Date table which would allow me to compare 2019 and 2020 data in the same KPI visual? Currently, it only shows data for the most recent year (2020). 

 

 

Current KPI setup: 

gpa0RU5.png

 

Alternatively, are there any custom KPI visuals that allow me to skip the trend axis and just compare the raw numbers of Total Form Fills & Previous Period Form Fills? I am not interested in the trend visual in the KPI, just the comparison of the 2 numbers and the % difference of these numbers. I also like how the number is green if the Form Fills are greater than the Previous Period Form Fills and red if it is lower than the Previous Period Form Fills. 

 

Thanks in advance for your suggestions! 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Comparing Month Year Across Different Years in the KPI Visual

amitchandakk , I have decided to create a "Start of Century Column in my date table by using a SWITCH function. 

 

 

 

Start of Century = SWITCH(
    Date_tbl[Year],
    2016,2000,
    2017,2000,
    2018,2000,
    2019,2000,
    2020,2000,
    2021,2000,
    2022,2000,
    2023,2000,
    2024,2000,
    2025,2000,
    0
)

 

 

 This allows me to compare my month years across different years. 

 

Like this: eN1xUNh.png

View solution in original post

2 REPLIES 2
Highlighted
Super User IV
Super User IV

Re: Comparing Month Year Across Different Years in the KPI Visual

@loganriebel , if these are continuous month you should be able to do with time intelligence and date table

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last MTD (complete) Sales =  CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))

diff = [MTD Sales]-[last MTD Sales]
diff % = divide([MTD Sales]-[last MTD Sales],[last MTD Sales])

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...


Appreciate your Kudos.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

Highlighted
Frequent Visitor

Re: Comparing Month Year Across Different Years in the KPI Visual

amitchandakk , I have decided to create a "Start of Century Column in my date table by using a SWITCH function. 

 

 

 

Start of Century = SWITCH(
    Date_tbl[Year],
    2016,2000,
    2017,2000,
    2018,2000,
    2019,2000,
    2020,2000,
    2021,2000,
    2022,2000,
    2023,2000,
    2024,2000,
    2025,2000,
    0
)

 

 

 This allows me to compare my month years across different years. 

 

Like this: eN1xUNh.png

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors