Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Reply
kxj
Frequent Visitor

KPI Visual: Measure in Target Goal Field

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

kxj_1-1672858098741.png

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:

kxj_2-1672858418961.png

 

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 

 

1 ACCEPTED 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:

kxj_1-1672934664464.png

I appreciate your response!

View solution in original post

2 REPLIES 2
v-yueyunzh-msft
Community Support
Community Support

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:

vyueyunzhmsft_0-1672883712078.png

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:

kxj_1-1672934664464.png

I appreciate your response!

Helpful resources

Announcements
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.