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.
Hello,
I have a data model that consists of three tables, one fact table, and two dimensions. The dimensions are both joined to the Fact with a one-to-many relationship
I have been asked to find the max date from one dimension (Dim A) for each element in my second dimension (Dim B). I think I need to use Calculate here but I'm not sure how.
Image of a data model
Sample data
Goal results
Your indicated expected results cannot be achieved. Both dimensions (Category and Date) will be aggregated if combined with facts, so you cannot have two rows of B and only one row of A.
What you will need to do is create a measure that crawls through the data model
MaxDate =
var c = ADDCOLUMNS(VALUES(_FactValues[FactKeyA]),"FA",_FactValues[FactKeyA])
var d = ADDCOLUMNS(c,"MD",CALCULATE(max(_DimDate[Date]),Filter(_DimDate,_DimDate[FactKeyA]=[FA])))
return MAXX(d,[MD])
See attached for an implementation
Another alternative is to show the raw data, the dimensions without the facts.
See attached.
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 | |
37 | |
33 |
User | Count |
---|---|
99 | |
56 | |
51 | |
44 | |
40 |