Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi,
I have a list of transactions and premium amounts along with the date a transaction was recorded. I'm looking to compare Current Month to Date premium amounts with the Prior Year's Month to Date amounts. The KPI visual is shown as below (Current MTD as the "Indicator" and Prior Year MTD as the "Target Goal"):
I'm having issues populating the Target Goal with Prior Year MTD (PY MTD) since both Current and prior year transactions are included in the same table and use the premium field. The KPI just displays the total amount in both the Goal and Indicator field. The dashboard can be filtered by 3 different slicers: Region, User, and Segment Code and the data looks like this:
I thought I could utilize a SUMX measure paired with "SELECTEDVALUE" to calculate the PY MTD total and use that in the Target Goal so it will update when any slicers are changed, however the result returns as (Blank). Any help is appreciated
Solved! Go to Solution.
Hi Aniya,
Thank you for responding. I believe I figured it out. I had to create two measures: one for Current MTD premium and one for Prior Year MTD Premium in order for both values to show correctly on the KPI:
Prior Year MTD Prem = CALCULATE(SUMX(FILTER(ALLSELECTED(Table), 'Table'[Current MTD/Prior Year MTD] = "Prior Year MTD"),'Table'[Premium]))
This paired with another measure for Current MTD allows me to place both values on the KPI that also interacts with all of the Slicers:
I appreciate your response!
Hi , @kxj
According to your description, you want to get the sum of the [Premium] value when [Current MTD/Prior Year MTD]="Prior Year MTD" and it can be filtered by the [Region Code],[Segment Code],[Premium] slicers?
If this , you can try to use this dax :
Measure = SUMX( FILTER('Table','Table'[Current MTD/Prior Year MTD]="Prior Year MTD" ) ,[Premium])+0
Then we can get the result as follows:
If this method does not meet your needs, you can provide us with your desired output sample data in the form of tables, so that we can better help you solve the problem.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Aniya,
Thank you for responding. I believe I figured it out. I had to create two measures: one for Current MTD premium and one for Prior Year MTD Premium in order for both values to show correctly on the KPI:
Prior Year MTD Prem = CALCULATE(SUMX(FILTER(ALLSELECTED(Table), 'Table'[Current MTD/Prior Year MTD] = "Prior Year MTD"),'Table'[Premium]))
This paired with another measure for Current MTD allows me to place both values on the KPI that also interacts with all of the Slicers:
I appreciate your response!
User | Count |
---|---|
115 | |
95 | |
87 | |
76 | |
65 |
User | Count |
---|---|
138 | |
113 | |
110 | |
98 | |
93 |