This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello
Can you try inputting the following data please in a pbix and help me overcome the issues?
Table1:
ID; CATEGORY;
A1; A;
A2; A;
A3; A;
B1; B;
B2; B;
Table2:
ID; NUMBER OF ITEMS
A1; 1
A2; 10
A3; 3
B1; 2
B2; 1
I want to create a table visual in the following format:
CATEGORY; ID; TOTAL ITEMS
The TOTAL ITEMS is the following MEASURE:
TOTAL ITEMS = IF(SELECTEDVALUE(Table1[CATEGORY])="A",
CALCULATE(COUNTROWS(Table2),FILTER(Table2,Table2[ID]=SELECTEDVALUE(Table1[ID])),Table2[NUMBER OF ITEMS]<>1),
IF(SELECTEDVALUE(Table1[CATEGORY])="B",
CALCULATE(COUNTROWS(Table2),FILTER(Table2,Table2[ID]=SELECTEDVALUE(Table1[ID])),Table2[NUMBER OF ITEMS]=<>2),
BLANK()))
So the result in the table visual should be:
CATEGORY; ID; TOTAL ITEMS
A; A1; 0/blank
A; A2; 1
A; A3; 1
B; B1; 0/blank
B; B2; 1
I also want to create a graph that will show in x axis the Category and in y axis the SUM of the TOTAL ITEMS as displayed in the table visual above (CATEGORY; ID; TOTAL ITEMS).
So the values in the graph would be:
bar1 = A and 2
bar2 = B and 1
Thanks!
Solved! Go to Solution.
Hi @Anonymous ,
You may create [SUM of the TOTAL ITEMS] using measure like DAX below, and put it into Values box of chart visual.
SUM of the TOTAL ITEMS= SUMX(VALUES([CATEGORY]), [TOTAL ITEMS] )
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You may create [SUM of the TOTAL ITEMS] using measure like DAX below, and put it into Values box of chart visual.
SUM of the TOTAL ITEMS= SUMX(VALUES([CATEGORY]), [TOTAL ITEMS] )
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous logic for Total Items is not clear, can you explain the logic how you are getting to those numbers, what is the business logic?
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.
Hello @parry2k
Sorry about that. I did not put the names of the columns/measures to represent my business case for anonymity.
Please find the pbix here: https://ufile.io/pek51r0j (I posted to another thread but I suppose you will only look here)
What I want to create is a graph with y axis to be the KPIs and y axis the SUM of the NO OF TRANSACTIONS.
Can you tell me please how to do that? Thanks!
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 31 | |
| 23 | |
| 15 |
| User | Count |
|---|---|
| 74 | |
| 58 | |
| 31 | |
| 31 | |
| 23 |