Forum Discussion

MCALDERON's avatar
MCALDERON
Frequent Visitor
4 years ago

Calculated column comparison

Hi, I need a little light here... I

have to create a visual that will tell me the top 10 bots that more increased from last month vs the current month. I have all the data needed -> bot name, current month, last month, current run hours, last month run hour. The problem is that I cannot think of a way to filter the top 10 based on the change vs each month and also a way that automatically the visual changes when the month change (ex. if we are in Mach then to the the data January vs February - Not sure if this is possible)  what I am currently ussing is the Tornado 2.1.0 visual to display the data:

As you can see is not working as expected because I should see the top 10 that ONLY increases on February vs January.

 

Any idea here?

2 Replies

  • MCALDERON , You can create measure like

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

    2nd last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-2,MONTH)))

     

    diff = [last MTD Sales] - [2nd last MTD Sales]

    or

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

     

    This you can use in TOPN filter at visual level

  • MCALDERON's avatar
    MCALDERON
    Frequent Visitor

    Thanks for your reply!! I did this before and not working as well, is showing months that shouldnt be on the top 10 of more increases