Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
jcichansky18
Frequent Visitor

Dynamic Cluster with DAX

Hi guys,

 

I have following data model:

 

Table: Contract

ContractIDValidFromValidTo
101/01/202015/04/2021

 

Table: Rooms

RoomIDContractIDAmountValidFromValidTo
11501/01/202018/01/2021
21619/01/202115/04/2021

 

Table: Cluster

ClusterIDRangeFromRangeToRangeDesc
102Small
235Medium
3610Large

 

+ 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!

1 REPLY 1
lbendlin
Super User
Super User

I don't think you need DAX for that.  Let the data model do the work for you.  Where are you stuck?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors