March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi There,
I am trying to create a measure where i am counting number of rows anf filtering the table with a column.
However as soon as i am doing it i am encountering error WHICH Is mentioned below:
Measure=calculate(countrows(iterm code),filter(table,Process name))
Can you please help me in achieving the same result?
Thanks,
ashish
Solved! Go to Solution.
@ashicool_10061
If you're trying to count the number of process names, for example, if your table has five rows with 'ABC', you can simply count the process names, which would give you a total of 5. You can do this using count(Table[processname])
or count(table[itemcode])
.
Apologies if I misunderstood, but could you clarify what you're referring to?
Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI
Hey @ashicool_10061 ,
The issue you're encountering is because you're trying to use a column in the filter that isn’t a Boolean expression. In your case, you're attempting to filter the table using just the column name (Process name
), which is causing the error. You can fix the measure by ensuring the filter condition is properly defined:
Measure =
CALCULATE(
COUNTROWS('item code'),
FILTER('table', 'table'[Process name] = "Some Value") -- Replace "Some Value" with the actual value you want to filter on
)
However, based on your example, I believe you might be able to simplify the measure like this:
Measure = COUNT('table'[Process name])
Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI
Hi @marcelsmaglhaes ,
I have tried themeasure wheere you have mentioned to replace "Some value" with the value which i want
Measure =
CALCULATE(
COUNTROWS('item code'),
FILTER('table', 'table'[Process name] = "Some Value") -- Replace "Some Value" with the actual value you want to filter on
)
however if i will do this then it will be for particular process name however i need a dynamic or count of each process name present in that table .
Also if i will do the Count([process_name}) then it will give me the count of all values present there like "5" if i will take process name .
I want output as
Process name Item code
ABC 5
BCD 3
IS there any way we can do this ?
Thanks,
Ashish
@ashicool_10061
If you're trying to count the number of process names, for example, if your table has five rows with 'ABC', you can simply count the process names, which would give you a total of 5. You can do this using count(Table[processname])
or count(table[itemcode])
.
Apologies if I misunderstood, but could you clarify what you're referring to?
Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
146 | |
97 | |
79 | |
69 |