cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Brenden
Advocate II
Advocate II

"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

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

@Brenden 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.

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: 

@Brenden

 

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.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors