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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

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

Sept NL Carousel

Fabric Community Update - September 2024

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