cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MissBI_21
Frequent Visitor

Measure does not sum in table

Hi,

 

I was wondering if anyone could help.

 

I have a measure (UK Days Available) which uses data from two tables:

MissBI_21_0-1628088124739.png

 

When I have this measure in a table by name of employee, it does not sum the total number of days available, it just shows -4 as the total:

MissBI_21_0-1628088269064.png

 

Can someone help me to get these days to sum up please?

 

1 ACCEPTED SOLUTION
parry2k
Super User III
Super User III

@MissBI_21 create another measure  and use it for visualization

 

New Measure = SUMX ( VALUES ( YourTable[Employee] ), [Existing UK Days Available Measure] )

 

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

7 REPLIES 7
parry2k
Super User III
Super User III

@MissBI_21 you have to use measure instead of 1, I just used that as an example.

 

New Measure = 
SUMX ( 
VALUES ( YourTable[Employee] ), 
IF ( CALCULATE ( MAX ( YourTable[Employee] ) ) IN { "X", "Y", "Z" }, [Some measure here],
[Existing UK Days Available Measure] )
)
)





Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





parry2k
Super User III
Super User III

@MissBI_21 not sure but maybe something like this:

 

New Measure = 
SUMX ( 
VALUES ( YourTable[Employee] ), 
IF ( CALCULATE ( MAX ( YourTable[Employee] ) ) IN { "X", "Y", "Z" }, 1, 
[Existing UK Days Available Measure] )
)
)

 

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





It almost worked.. I have a filter on dates to only display the previous two months. With the measure you sent, for some reason, the table displays all months.

parry2k
Super User III
Super User III

@MissBI_21 create another measure  and use it for visualization

 

New Measure = SUMX ( VALUES ( YourTable[Employee] ), [Existing UK Days Available Measure] )

 

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

This worked! Thank you so much! 

Out of the employees, if I wanted a particular employee to show a certain amount and the others to be calculated by the formula, do you know

how would I do that?

Greg_Deckler
Super User IV
Super User IV

@MissBI_21 This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Top Kudoed Authors