Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
i have a table like below
emp code | monthlycost | start date | end date | |
1 | 10000 | 01-apr-21 | 31-mar-22 | |
1 | 15000 | 01-apr-22 | ||
2 | 20000 | 01-apr-21 | 31-mar-22 |
i need to show this as month wise total cost like below
apr-21 | 30000(sum of 10000+20000) |
may-21 | 30000 |
june-21 | 30000 |
apr-22 | 15000 (then it will show me cost where start date is after 1apr22 and e |
Solved! Go to Solution.
Hi,
I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.
I suggest having a Dim-Calendar table.
Please check the below picture and the attached pbix file.
Salary sum measure: =
SUMX (
FILTER (
Data,
Data[start date] <= MAX ( 'Calendar'[Date] )
&& OR ( Data[end date] >= MIN ( 'Calendar'[Date] ), Data[end date] = BLANK () )
),
Data[monthlycost]
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Schedule a short Teams meeting to discuss your question
thank for your help. you are expert.
it's working now
also i have to crack i more logic i have two table like below
1. Live employee Master table
empcode | BU | function |
E100 | AGRI | HR |
E101 | ECE | R&D |
E102 | AGRI | Fin |
E103 | AGRI | HR |
2. Transfer table
empcode | AttributeTypeDescription | NewAttributeDesc | OLDAttributeDesc | EffectiveDate |
E100 | BU | AGRI | ECE | 01-Apr-22 |
E101 | Function | R&D | Fin | 5-May-22 |
i have already created calender table
need to create data like if slicer is BU is AGRI and Fun is HR
Month | headcount |
feb-22 | 2 |
mar-22 | 2 |
apr-22 | 3 |
may-22 | 3 |
june-22 | 3 |
and so on | 3 |
if slicer is BU is ECE and Fun is R&D
Month | headcount |
feb-22 | 0 |
mar-22 | 0 |
apr-22 | 0 |
may-22 | 1 |
june-22 | 1 |
and so on | 1 |
pls help
Hi,
I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.
I suggest having a Dim-Calendar table.
Please check the below picture and the attached pbix file.
Salary sum measure: =
SUMX (
FILTER (
Data,
Data[start date] <= MAX ( 'Calendar'[Date] )
&& OR ( Data[end date] >= MIN ( 'Calendar'[Date] ), Data[end date] = BLANK () )
),
Data[monthlycost]
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Schedule a short Teams meeting to discuss your question
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
75 | |
54 | |
38 | |
31 |
User | Count |
---|---|
99 | |
56 | |
50 | |
42 | |
40 |