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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Sriku
Helper IV
Helper IV

Filter items and finding the average of Days

Hi ,

 

I want to filter tickets group having max Ticket indexing and show in graph avergae if "Update ticket group" columns  -- "General" is selected the show value as 0.01, if second row "Pay" is selected it should show 0.01, third row "Time" is selected then 0.07 and so on

Ticket IndexingIndex2Ticket IDUpdate ticket groupUpdate - TimestampUpdate ticket group - StartUpdate ticket group - PrevIs HopDays in Ticket groupUpdate ticket group - NextHops CountUpdate ticket group - End
11258298General2025-03-10 08:47:43General 10.01Pay3Pay
22258298Pay2025-03-10 08:59:01GeneralGeneral10.07Time3Pay
33258298Time2025-03-10 10:35:13GeneralPay11.15Pay3Pay
40258298Pay2025-03-11 14:12:40GeneralTime02.74 3Pay

 

 

 

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@Sriku 

Create a new calculated column to assign the values based on the "Update ticket group" column. Go to the "Modeling" tab and select "New Column". Use the following DAX formula:

DAX
Ticket Group Value =
SWITCH(
TRUE(),
'Table'[Update ticket group] = "General", 0.01,
'Table'[Update ticket group] = "Pay", 0.01,
'Table'[Update ticket group] = "Time", 0.07,
'Table'[Update ticket group] = "Other", 0.07, // Add other conditions as needed
BLANK()
)

 

Create a measure to filter the data to only include the rows with the maximum "Ticket Indexing" for each "Ticket ID". Go to the "Modeling" tab and select "New Measure"

DAX
Max Ticket Indexing =
CALCULATE(
MAX('Table'[Ticket Indexing]),
ALLEXCEPT('Table', 'Table'[Ticket ID])
)

 

Create a measure to calculate the average of the values from the calculated column.

DAX
Average Value =
AVERAGEX(
FILTER(
'Table',
'Table'[Ticket Indexing] = [Max Ticket Indexing]
),
'Table'[Ticket Group Value]
)

 

Add a new visual (e.g., a bar chart) to your report.
Drag the "Ticket ID" to the Axis.
Drag the "Average Value" measure to the Values.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

6 REPLIES 6
v-echaithra
Community Support
Community Support

Hi @Sriku ,

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Chaithra.

v-echaithra
Community Support
Community Support

Hi @Sriku 

We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Chaithra.

v-echaithra
Community Support
Community Support

Hi @Sriku ,

Di you try the above steps provided by the super user?

v-echaithra
Community Support
Community Support

Hi @Sriku ,

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Chaithra.

@v-echaithra , Still looking for further assistance

bhanu_gautam
Super User
Super User

@Sriku 

Create a new calculated column to assign the values based on the "Update ticket group" column. Go to the "Modeling" tab and select "New Column". Use the following DAX formula:

DAX
Ticket Group Value =
SWITCH(
TRUE(),
'Table'[Update ticket group] = "General", 0.01,
'Table'[Update ticket group] = "Pay", 0.01,
'Table'[Update ticket group] = "Time", 0.07,
'Table'[Update ticket group] = "Other", 0.07, // Add other conditions as needed
BLANK()
)

 

Create a measure to filter the data to only include the rows with the maximum "Ticket Indexing" for each "Ticket ID". Go to the "Modeling" tab and select "New Measure"

DAX
Max Ticket Indexing =
CALCULATE(
MAX('Table'[Ticket Indexing]),
ALLEXCEPT('Table', 'Table'[Ticket ID])
)

 

Create a measure to calculate the average of the values from the calculated column.

DAX
Average Value =
AVERAGEX(
FILTER(
'Table',
'Table'[Ticket Indexing] = [Max Ticket Indexing]
),
'Table'[Ticket Group Value]
)

 

Add a new visual (e.g., a bar chart) to your report.
Drag the "Ticket ID" to the Axis.
Drag the "Average Value" measure to the Values.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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