Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
AlessandroBe
Regular Visitor

costum column token eof erro

Column = VAR myrow={[A],[B],[C],[D]}
RETURN
COUNTROWS(Filter(myrow,[Value]="Yes"))

what is wrong? 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @AlessandroBe 

Original data :

Ailsamsft_0-1646288626658.png

Then create a table to return the “YES” and “NO” .

Table 2 =
var _a=SELECTCOLUMNS('Table',"Value",[A])
var _b=SELECTCOLUMNS('Table',"Value",[B])
var _c=SELECTCOLUMNS('Table',"Value",[C])
var _d=SELECTCOLUMNS('Table',"Value",[D])
RETURN UNION(_a,_b,_c,_d)

You will get a result as shown :

Ailsamsft_1-1646288626659.png

Create a measure to count the number of “YES”

Measure = CALCULATE(COUNT('Table 2'[Value]),'Table 2'[Value]="yes")

Put the measure in a card visual .

Ailsamsft_2-1646288626659.png

I have attached my pbix file , you can refer to it .

 

Best Regards

Community Support Team _ Ailsa Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @AlessandroBe 

Original data :

Ailsamsft_0-1646288626658.png

Then create a table to return the “YES” and “NO” .

Table 2 =
var _a=SELECTCOLUMNS('Table',"Value",[A])
var _b=SELECTCOLUMNS('Table',"Value",[B])
var _c=SELECTCOLUMNS('Table',"Value",[C])
var _d=SELECTCOLUMNS('Table',"Value",[D])
RETURN UNION(_a,_b,_c,_d)

You will get a result as shown :

Ailsamsft_1-1646288626659.png

Create a measure to count the number of “YES”

Measure = CALCULATE(COUNT('Table 2'[Value]),'Table 2'[Value]="yes")

Put the measure in a card visual .

Ailsamsft_2-1646288626659.png

I have attached my pbix file , you can refer to it .

 

Best Regards

Community Support Team _ Ailsa Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@AlessandroBe , What are you trying to achieve here?

 

If you want to create a table with multiple rows. Then use Row and union

 

example

union(

ROW("Month", 1),
ROW("Month", 2),
ROW("Month", 3)
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.