Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi guys,
I have following data model:
Table: Contract
| ContractID | ValidFrom | ValidTo |
| 1 | 01/01/2020 | 15/04/2021 |
Table: Rooms
| RoomID | ContractID | Amount | ValidFrom | ValidTo |
| 1 | 1 | 5 | 01/01/2020 | 18/01/2021 |
| 2 | 1 | 6 | 19/01/2021 | 15/04/2021 |
Table: Cluster
| ClusterID | RangeFrom | RangeTo | RangeDesc |
| 1 | 0 | 2 | Small |
| 2 | 3 | 5 | Medium |
| 3 | 6 | 10 | Large |
+ table: Date (standard calendar table)
My fact table is Contract, which has relation to Rooms via ContractID.
What I need to do is following:
- select yyyy-mm on date slicer in PBI (single selection)
- read out selected value - last day of selected month: CALCULATE ( MAX ( Date[Date] ), ALLSELECTED ( Datum ) )
- show all valid Contracts based on date selection (previous step)
- additionally show Amount of rooms based on date selection
- show also RangeDesc from table Cluster based on date selection
Example:
- selected value in date slicer: 2020-12
- contract valid = Yes
- Amount of rooms: 5 ; Desc: Medium
- new selected value: 2021-02
- contract valid = Yes
- Amount of rooms: 6 ; Desc: Large
Could you please help me with DAX?
Thanks!
I don't think you need DAX for that. Let the data model do the work for you. Where are you stuck?
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |