This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowThe Fabric community is upgrading! Read all of the details including the timeline and what you can expect. Learn more
BlackProducts = FILTER(Products, Products[Color] = “Black”)
It returns an error "the expression refers to multiple columns. multiple columns cannot be converted to a scalar value"
Without creating a table how to use the above expression into a Dax to create a measure
it works perfect if I use the create new table option but I want to create a measure
thanks
Solved! Go to Solution.
@BishwaR , Filter return a table so measure will error for that.
You can have measure like this
BlackProducts = calculate(countrows(Products),FILTER(Products, Products[Color] = “Black”))
or
BlackProducts = calculate(countrows(Table),FILTER(Products, Products[Color] = “Black”))
@BishwaR , Filter return a table so measure will error for that.
You can have measure like this
BlackProducts = calculate(countrows(Products),FILTER(Products, Products[Color] = “Black”))
or
BlackProducts = calculate(countrows(Table),FILTER(Products, Products[Color] = “Black”))
Thanks @amitchandak Now how can I add a condition like if it is " Black" then " N/A" in the same measure
@BishwaR ,
if(isblank(calculate(countrows(Table),FILTER(Products, Products[Color] = “Black”))), "No data", "NA")
something like above, you can swap then and else results
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
| User | Count |
|---|---|
| 24 | |
| 22 | |
| 20 | |
| 18 | |
| 14 |
| User | Count |
|---|---|
| 31 | |
| 26 | |
| 23 | |
| 20 | |
| 20 |