Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I am rather new to Power BI as I am transisitioning from Tableau and I am in need of assistance. I am needing assistance to guide me on how I might go about creating an appropriate 'calculation' in Power BI that will accomplish what I was previously using in Tableau to acheive 'Receipt Quantity by User Count'; my apologies in advance for any miscommunication and/or confusion I may cause when adddressing my request.
-Goal: Create a bar chart which represents pre-defined 'Receipt' counts (Y Axis) by 'Distinct Count of all Participants' (UserId's)
- I have created a measure which defines my ranges for the above mentioned 'Receipts' however I am unable to now tie that to the 'DistinctCount(UserID).
- The calculation I had used in Tableau allowed for the following (Tableau Calculation listed below):
{FIXED [Participant Key_C]:
IF COUNTD([Content Key])<= 0 THEN '0'
ELSEIF COUNTD([Content Key])> 0 AND COUNTD([Content Key]) < 2 THEN '1 Receipt'
ELSEIF COUNTD([Content Key])> 1 AND COUNTD([Content Key]) < 3 THEN '2 Receipts'
ELSEIF COUNTD([Content Key])> 2 AND COUNTD([Content Key]) < 4 THEN '3 Receipts'
ELSEIF COUNTD([Content Key])> 3 AND COUNTD([Content Key]) < 5 THEN '4 Receipts'
ELSEIF COUNTD([Content Key])> 4 AND COUNTD([Content Key]) < 6 THEN '5 Receipts'
ELSEIF COUNTD([Content Key])> 5 AND COUNTD([Content Key]) < 7 THEN '6 Receipts'
ELSEIF COUNTD([Content Key])> 6 AND COUNTD([Content Key]) < 8 THEN '7 Receipts'
ELSEIF COUNTD([Content Key])> 7 AND COUNTD([Content Key]) < 9 THEN '8 Receipts'
ELSEIF COUNTD([Content Key])> 8 AND COUNTD([Content Key]) < 10 THEN '9 Receipts'
ELSEIF COUNTD([Content Key])> 9 AND COUNTD([Content Key]) < 11 THEN '10 Receipts'
ELSEIF COUNTD([Content Key])>= 11 THEN '11+ Receipts'
END
}
I have also attached two (2) images in hopes that the provided visual(s) may better illustrate what I am in need of.
This is the current state of my data in 'Power BI' with call-outs of what I actually need. The Column name 'Entries by Range' is a Measure I have already created, just unable to now group them together appropriatly.
Hi @Anonymous,
Turn your "Entries by Range" into a column, so you can put it on the axis of the Bar Chart.
For the Value you use "UserId" with a distinct count. This should give you the result you have shown.
Jan
Hi @Anonymous
just one question: why do you use statement like "COUNTD([Content Key])> 0 AND COUNTD([Content Key]) < 2",but not simple
COUNTD([Content Key]) = 1Anyway, maybe grouping function (and entire article) https://docs.microsoft.com/en-us/power-bi/desktop-grouping-and-binning will be useful for you
do not hesitate to give a kudo to useful posts and mark solutions as solution
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |