March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
i have a open tickets table and region table. PFB, i need matrix Table as show in the screenshot.
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
WINDOW function (DAX) - DAX | Microsoft Learn
Age Top 2 aging: =
IF (
HASONEVALUE ( Open_Tickets[Ticket id] ),
CALCULATE (
MAX ( Open_Tickets[Age] ),
KEEPFILTERS (
WINDOW (
1,
ABS,
2,
ABS,
SUMMARIZE (
ALL ( Open_Tickets ),
Dim_Region[Region],
Open_Tickets[Ticket id],
Open_Tickets[Date],
Open_Tickets[Age]
),
ORDERBY ( Open_Tickets[Date], ASC ),
,
PARTITIONBY ( Dim_Region[Region] )
)
)
)
)
Date Top 2 aging: =
IF (
HASONEVALUE ( Open_Tickets[Ticket id] ),
CALCULATE (
MAX ( Open_Tickets[Date] ),
KEEPFILTERS (
WINDOW (
1,
ABS,
2,
ABS,
SUMMARIZE (
ALL ( Open_Tickets ),
Dim_Region[Region],
Open_Tickets[Ticket id],
Open_Tickets[Date],
Open_Tickets[Age]
),
ORDERBY ( Open_Tickets[Date], ASC ),
,
PARTITIONBY ( Dim_Region[Region] )
)
)
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
Please check the below picture and the attached pbix file.
WINDOW function (DAX) - DAX | Microsoft Learn
Age Top 2 aging: =
IF (
HASONEVALUE ( Open_Tickets[Ticket id] ),
CALCULATE (
MAX ( Open_Tickets[Age] ),
KEEPFILTERS (
WINDOW (
1,
ABS,
2,
ABS,
SUMMARIZE (
ALL ( Open_Tickets ),
Dim_Region[Region],
Open_Tickets[Ticket id],
Open_Tickets[Date],
Open_Tickets[Age]
),
ORDERBY ( Open_Tickets[Date], ASC ),
,
PARTITIONBY ( Dim_Region[Region] )
)
)
)
)
Date Top 2 aging: =
IF (
HASONEVALUE ( Open_Tickets[Ticket id] ),
CALCULATE (
MAX ( Open_Tickets[Date] ),
KEEPFILTERS (
WINDOW (
1,
ABS,
2,
ABS,
SUMMARIZE (
ALL ( Open_Tickets ),
Dim_Region[Region],
Open_Tickets[Ticket id],
Open_Tickets[Date],
Open_Tickets[Age]
),
ORDERBY ( Open_Tickets[Date], ASC ),
,
PARTITIONBY ( Dim_Region[Region] )
)
)
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Always forget the windows function, great solution.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @DK_m ,
Create the following measure:
Filter Rows =
IF (
SELECTEDVALUE ( 'Open Tickets'[Ticket ID] )
IN SELECTCOLUMNS (
CALCULATETABLE( TOPN (
2,
ADDCOLUMNS ( ALLSELECTED ( 'Open Tickets' ), "DD", RELATED ( Region[Region] ) ),
'Open Tickets'[Age]
), Region[Region] in VALUES(Region[Region])),
"T", 'Open Tickets'[Ticket ID]
),
1
)
Add it has a filter on your visual and select is not blank result below:
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsMarch 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
89 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |