Forum Discussion
Measures to remove columns…
- 4 years ago
Dbrunts0888_
Here is the sample file with the report https://www.dropbox.com/t/TnKpHp22hgLlkqQJ
First of all I have to say that working with Power Pivot is not a pleasant experience 🙂
Your whole subject is about building the correct data model. As you can see below I have added a Calendar Table (can be created in PowerPivot with one click). Also I have created a separate Branch Table that contains the unique list of names and numbers of all branches. Other tables should have the required column for building the correct relationship (either date or branch number or sometimes both)
Once your data model is set, the rest is simple. You Net Margin by Branch/Date measure isTotal Hours Worked := SUMX ( CROSSJOIN ( VALUES ( Branches[BRANCH] ), VALUES ( 'Calendar'[Date] ) ), CALCULATE ( ( SUM ( HoursSpend[Hours] ) + DIVIDE ( ( SUM ( HoursSpend[chmisc1] ) + SUM ( HoursSpend[chmisc1] ) ), VALUES ( TravelHours_Charge[CHARGE] ) ) ) * VALUES ( MarginPH[MARGIN] ) ) )This is how your report looks like. Must be interested in other detailed reports, please feel free to clarify your requirement so I can modify.
Please let me know if you have any further requirement.
Dbrunts0888_
Here is the sample file with the report https://www.dropbox.com/t/TnKpHp22hgLlkqQJ
First of all I have to say that working with Power Pivot is not a pleasant experience 🙂
Your whole subject is about building the correct data model. As you can see below I have added a Calendar Table (can be created in PowerPivot with one click). Also I have created a separate Branch Table that contains the unique list of names and numbers of all branches. Other tables should have the required column for building the correct relationship (either date or branch number or sometimes both)
Once your data model is set, the rest is simple. You Net Margin by Branch/Date measure is
Total Hours Worked :=
SUMX (
CROSSJOIN ( VALUES ( Branches[BRANCH] ), VALUES ( 'Calendar'[Date] ) ),
CALCULATE (
(
SUM ( HoursSpend[Hours] )
+ DIVIDE (
( SUM ( HoursSpend[chmisc1] ) + SUM ( HoursSpend[chmisc1] ) ),
VALUES ( TravelHours_Charge[CHARGE] )
)
)
* VALUES ( MarginPH[MARGIN] )
)
)
This is how your report looks like. Must be interested in other detailed reports, please feel free to clarify your requirement so I can modify.
Please let me know if you have any further requirement.
Thank you for your time and assistance with this. I will review and check up on the DAX measure you have used.