The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi Everyone,
I'm semi-new to PBI with no formal training or structured course-taking. I'm sort of learning on the job.
I need help with the following scenario. I have sales data with hours and dollar amount values. I was able to calculate the % of hours vs total sales but I'm not able to calculate the $$ value of those hours versus total sales. I tried multiplying the % dax measure with the measure of total sales but it didn't work, it skipped a couple of rows and only gave me the value of 1 row.
Sample Data: the last column is what i'm trying to achieve. multiply the allocation of horus for each row by the total value
Project Name | User | Hours | Value | Allocation of Hours | Value Allocation |
Mercury | John Doe | 3 | 0 | 30% | 3,000.00 |
James Smith | 3 | 0 | 30% | 3,000.00 | |
Jane Doe | 4 | 10,000.00 | 40% | 4,000.00 | |
Total | 10 | 10,000.00 | 100% | 10,000.00 |
Try these measures:
Total Hours = SUM ( Table1[Hours] )
Total Value = SUM ( Table1[Value] )
Allocation of Hours =
VAR vNumerator = [Total Hours]
VAR vDenominator =
CALCULATE (
[Total Hours],
ALLSELECTED ( Table1 ),
VALUES ( Table1[Project Name] )
)
VAR vResult =
DIVIDE ( vNumerator, vDenominator )
RETURN
vResult
Value Allocation =
VAR vValue =
CALCULATE (
[Total Value],
ALLSELECTED ( Table1 ),
VALUES ( Table1[Project Name] )
)
VAR vFactor = [Allocation of Hours]
VAR vResult = vValue * vFactor
RETURN
vResult
Proud to be a Super User!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
115 | |
81 | |
80 | |
48 | |
40 |
User | Count |
---|---|
149 | |
110 | |
66 | |
64 | |
56 |