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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
RanHo
Helper V
Helper V

DIFFERENCE OF 2 COLUMNS ( GOAL AND ACTUAL) IN DIFFERENT TABLE

Good day Guys im new to POWERBI, I'm having trouble in this problem 
I have sample data here

 

RanHo_0-1632187383029.png

 as you can see guys i have goal and the policy which is the production what i want to achieve is  I want to subract the MONTHLY GOAL to count of POLICY per month which is like this, and also want to show if the policy already reach each goal it would be GREEN, then if not RED. Is it possible to subtract MONTHLY GOAL to count of POLICY per month? Im stuck on this problem  can someone help ,  Thanks in Advance!

RanHo_1-1632187539522.png

 

By the way I only show the  output for the month of January for sample. Thanks

 

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@RanHo Maybe:

Monthly Goal Measure = MAX('Table'[MONTHLY GOAL])

Policy Count = COUNTROWS('Table')

Differences = [Monthly Goal Measure] - [Policy Count]

 

Assumes filtering by MONTH or having MONTH in your visual.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

@RanHo Maybe:

Monthly Goal Measure = MAX('Table'[MONTHLY GOAL])

Policy Count = COUNTROWS('Table')

Differences = [Monthly Goal Measure] - [Policy Count]

 

Assumes filtering by MONTH or having MONTH in your visual.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler  Thanks a lot it work Sir, can I ask another question 'bout color conditional formatting if POLICY COUNT reach its MONTHLY GOAL the font need to be GREEN otherwise RED. Do I need to create a new measure? Thanks

@RanHo I think you could use the Difference measure to do that, basically if <= 0 green, otherwise red?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler Thanks Sir!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.