The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am using the below formula to get the sum of hours from the most current work date (Current Earned-Used Hours +(-))...I see online that there are issues getting the total when using measures. I want to create a card with the total hours versus using the totals at the end of a table which will have the wrong sum. How can I write a formula for the card that will give me the proper sum of the Current Earned-Used Hours +(-)?
Solved! Go to Solution.
Hi @Anonymous ,
You may delete the created measure [Current Earned-Used Hours +(-) TEST VERSION] in your pbix file, then create new measure which will refer to the original measure [Current Earned-Used Hours +(-)] using DAX below.
Current Earned-Used Hours +(-)_New =
VAR _table =
SUMMARIZE (
'ProjectDetails',
'ProjectDetails'[Project Number],
"_Value", [Current Earned-Used Hours +(-)]
)
RETURN
IF (
HASONEVALUE ( 'ProjectDetails'[Project Number] ),
[Current Earned-Used Hours +(-)],
SUMX ( _table, [_Value] )
)
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Amy...I really appreciate all of the effort you put into helping try and figure this out!
Hello @kentyler ,
Try this:
Measure =
SUMX (
SUMMARIZE (
VALUES ( ProjectDetails[Work Date] ),
ProjectDetails[Work Date],
"Hours", [Expression]
),
[Hours]
)
More details can be found here: https://community.powerbi.com/t5/Desktop/Change-subtotal-calculation-of-matrix-from-Average-to-Sum/t...
I do not understand this portion of the formula. Can you explain?
Thx
"Hours", [Expression]
),
[Hours]
)
Help when you know. Ask when you don't!
Alas this formula returned the same result as the original (-1370 but the actual result should be -11,408)...thoughts?
User | Count |
---|---|
78 | |
74 | |
43 | |
32 | |
28 |
User | Count |
---|---|
104 | |
93 | |
52 | |
50 | |
46 |