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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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
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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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