The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi all,
I have a matrix table with Orders and orderlines as rows. Furthermore, the productcode and description are dimensions which are placed as 'value' (first value) in the matrix table. When expanded, everything is correct because there is only 1 product for each orderline.
What I would like to do is that if the matrix table is collapsed, the productcode and description of the first orderline (10) should be showed.
Coincidentally is this already correct for the productcode because the first orderline contains the productcode with the lowest number. However, the description is sorted alphabetically, so now the wrong description is shown which does not belong to that productcode.
I already tried to sort the decription column on Productcode, but this doesnt seem to work.
Are there any other ways to achieve this?
Solved! Go to Solution.
Hi , @Giel0
According to your description, you want to "if the matrix table is collapsed, the productcode and description of the first orderline (10) should be showed. ".
Here are the steps you can refer to :
(1)This is my test data:
(2)We can create two measures like this:
Description Measure = var _t =SUMMARIZE('Table','Table'[Orderline],'Table'[description])
var _min_line = MINX(_t,[Orderline])
return
MAXX(FILTER(_t , [Orderline] = _min_line) , [description])
Productcode Measure = var _t =SUMMARIZE('Table','Table'[Orderline],'Table'[productcode])
var _min_line = MINX(_t,[Orderline])
return
MAXX(FILTER(_t , [Orderline] = _min_line) , [productcode])
(3)Then we cna put this measures on the visual and we can get the result as follows:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , @Giel0
According to your description, you want to "if the matrix table is collapsed, the productcode and description of the first orderline (10) should be showed. ".
Here are the steps you can refer to :
(1)This is my test data:
(2)We can create two measures like this:
Description Measure = var _t =SUMMARIZE('Table','Table'[Orderline],'Table'[description])
var _min_line = MINX(_t,[Orderline])
return
MAXX(FILTER(_t , [Orderline] = _min_line) , [description])
Productcode Measure = var _t =SUMMARIZE('Table','Table'[Orderline],'Table'[productcode])
var _min_line = MINX(_t,[Orderline])
return
MAXX(FILTER(_t , [Orderline] = _min_line) , [productcode])
(3)Then we cna put this measures on the visual and we can get the result as follows:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly