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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Associate two different lines with each other

Hey,

 

I have a database that keeps track of chat sessions that looks something like this:

idsession_idoperation_idresult_categoryresult_valuetimestamp
1b3612c2f-5a3d-4c81-a7ae-fafef5b27fb1BOT_STARTnullnull2019-12-01 00:17:40
2b3612c2f-5a3d-4c81-a7ae-fafef5b27fb1READING_REGISTER262019-12-01 00:17:53
3b3612c2f-5a3d-4c81-a7ae-fafef5b27fb1GOODBYEnullnull2019-12-01 00:18:02
4b3612c2f-5a3d-4c81-a7ae-fafef5b27fb1RATING142019-12-01 00:18:05

 

The "result_category" tells me what kind of result to expect (success/insuccess, integers, accept/don't accept, etc.) and "result_value" tells me what the actual result is (so category 2, result 6 means it's a success; category 1, result 4 means that the rating was 4 stars out of 5; etc.).

The "session_id" is a random value assigned to each session (the same user might have different sessions with different ids).

 

The problem is, I want to associate the "rating" operation to other operations such as "reading_register" so that I know that users, on average, rate operation X with Y stars. There are other operations such as "bot_start" or "goodbye" that I want to ignore because the user's rating isn't about those. How do I do this? 

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous,

You can try to convert your table fields with 'group' and 'transpose' functions(power query) to convert specific rows to table columns. Then you can simply summarize rating column values with specific conditions.

If you can't convert your table structure, you can write a measure formula to calculate with variables steps.

Steps:

1. Filter on the table to check 'operation_id' equal to 'READING_REGISTER' and result category and value suitable for your requirement and extract session_id list.
2. Use extracted session_id list to filter table records and choose 'operation_id' equal to 'RATING', then do aggregate on result value of filtered records.

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

Can you explain output with example

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi! Ideally, I'd like to have a table in Power BI something like this:

 

operation_idaverage_rating
READING_REGISTER4.2
DOWNLOAD_PDF3.5
PAYMENT_DATA3.3

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.