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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

"Bucketing" OR how to use this measure in a table

I wrote this measure which achieves what I want - to "bucket" Ticket volumes by how many times they are moved between teams - "0, 1 to 3, >=4, or >= 10" times moved.

 

Move Bucket = IF([Moved Between IT Teams]=0,"0 (Not moved yet)", IF([Moved Between IT Teams]<=3,"1 to 3", IF([Moved Between IT Teams]<10,">=4",IF([Moved Between IT Teams]<40,">=10",IF([Moved Between IT Teams]>=40,">=40")))))
 
Unfortunately after writing this I realized I can't use it as Rows in a Matrix Visual.
 
This is my desired result:
Brenden_0-1694540759929.png

 

My "Move Bucket" measure uses another measure "Moved between IT Teams" which counts the instances where the TICKET ID appears in a column called NEWMATCH. If the "old" team and "new" team in this table contain an eligible IT team, then NEWMATCH is populated with the TICKETID to indicate so, otherwise is blank.

Moved Between IT Teams = COUNTROWS(FILTER('2 Audit',CONTAINS('4 Report',[TICKET_ID],'2 Audit'[NEWMATCH])))
1 ACCEPTED SOLUTION
Anonymous
Not applicable

It is (quite) possible I misunderstood. However I did find a solution.

After relating my tables correctly, I added two columns to the main fact table. First to count how many rows matched the TICKETID from the other log table, and second to bucket that count depending on the value within.

1: Moved Between IT Teams_ = COUNTROWS(RELATEDTABLE('2 Audit'))


2: Move Bucket_ = IF('4 Report'[Moved Between IT Teams_] =0, "0 (Not moved yet)", IF('4 Report'[Moved Between IT Teams_] <=3, "1 to 3", IF('4 Report'[Moved Between IT Teams_] <10,">=4",IF('4 Report'[Moved Between IT Teams_]<40,">=10",IF('4 Report'[Moved Between IT Teams_]>=40,">=40")))))



 

View solution in original post

4 REPLIES 4
parry2k
Super User
Super User

@Anonymous I think it is exactly the same thing as what is in the video.  You are dynamically calculating the measure in which range a ticket is and then trying to use it on a row or slice by this. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

It is (quite) possible I misunderstood. However I did find a solution.

After relating my tables correctly, I added two columns to the main fact table. First to count how many rows matched the TICKETID from the other log table, and second to bucket that count depending on the value within.

1: Moved Between IT Teams_ = COUNTROWS(RELATEDTABLE('2 Audit'))


2: Move Bucket_ = IF('4 Report'[Moved Between IT Teams_] =0, "0 (Not moved yet)", IF('4 Report'[Moved Between IT Teams_] <=3, "1 to 3", IF('4 Report'[Moved Between IT Teams_] <10,">=4",IF('4 Report'[Moved Between IT Teams_]<40,">=10",IF('4 Report'[Moved Between IT Teams_]>=40,">=40")))))



 

parry2k
Super User
Super User

 I did a video on how to address measures as columns, check it out here: 

@Anonymous

 

https://youtu.be/-T1hK5W4m8I



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Thanks for the quick reply.

I watched the video, but I think I my problem lies somewhere in between the steps in the video.

I need to find a way to add a column in my table that will do the same calculation that my measure is doing (since I cannot use the measure to give me each bucket option).

Brenden_0-1694545384610.png

 

 

I don't believe my scenario matters which of my tables has the column. I just need the column to check my fact table and group by summed volumes.

Eg. If TICKETID "T123" appears 3 times, the column says "1 to 3". If TICKETID "456" appears 11 times, ">=10".

My buckets to be defined are as follows:
a. "0 (not moved yet)"

b. "1 to 3"

c. ">=4"
d. ">=10"

e. ">=40"


 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors