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, get a free DP-600 exam voucher to use by the end of 2024. Register 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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.