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!
User | Count |
---|---|
94 | |
86 | |
82 | |
76 | |
49 |
User | Count |
---|---|
160 | |
144 | |
103 | |
74 | |
57 |