Forum Discussion

ManjunathaEP's avatar
ManjunathaEP
Helper II
4 years ago
Solved

Calculation using 2 data cards %

Hi, Thank you in advance for helping out for the below.

I have a results by year and I would like to calculate extrapolated rate for the current year using previous years average.

Data is as follows:

I have a 2 data cards A is at 62% and B is at 57%, my objective is to calculate C (A/B = 92%). These are calculated using year filter. 

I tried doing C=divide(B,A), its giving the results of 100% as I have not filtered for any feilds. 

Please help me to arrive C,

 

  • Ashish_Mathur's avatar
    Ashish_Mathur
    4 years ago

    Hi,

    These measures work

    Average win % from 2017 - 2021 = AVERAGEX(filter(summarize(VALUES('Table'[Year]),'Table'[Year],"ABCD",[Sum_Win],"EFGH",[Sum_Opps]),'Table'[Year]>=2017&&'Table'[Year]<=2021),DIVIDE([ABCD],[EFGH]))
    Win % in 2022 = AVERAGEX(filter(summarize(VALUES('Table'[Year]),'Table'[Year],"ABCD",[Sum_Win],"EFGH",[Sum_Opps]),'Table'[Year]=2022),DIVIDE([ABCD],[EFGH]))
    Measure = DIVIDE([Win % in 2022],[Average win % from 2017 - 2021])

    Hope this helps.

  • Ashish_Mathur's avatar
    Ashish_Mathur
    3 years ago

    I have helped you enough on this.  I rewrote all formulas in the file which i shared with you today.  Looks like tyou have not even looked at that file.  Someone else will help you

12 Replies

  • Kindly support on the above query. I am thankful in advance for the support

  • Hi,

    Share the download link of your PBI file.  Ensure that you already have your measures for A and B there.

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        Hi,

        These measures work

        Average win % from 2017 - 2021 = AVERAGEX(filter(summarize(VALUES('Table'[Year]),'Table'[Year],"ABCD",[Sum_Win],"EFGH",[Sum_Opps]),'Table'[Year]>=2017&&'Table'[Year]<=2021),DIVIDE([ABCD],[EFGH]))
        Win % in 2022 = AVERAGEX(filter(summarize(VALUES('Table'[Year]),'Table'[Year],"ABCD",[Sum_Win],"EFGH",[Sum_Opps]),'Table'[Year]=2022),DIVIDE([ABCD],[EFGH]))
        Measure = DIVIDE([Win % in 2022],[Average win % from 2017 - 2021])

        Hope this helps.