Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
27 | |
20 | |
15 | |
12 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
18 |