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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
RanHo
Helper IV
Helper IV

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.


@ 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!:
Mastering Power BI 2nd Edition

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.


@ 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!:
Mastering Power BI 2nd Edition

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?


@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler Thanks Sir!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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