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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
PaulPalkowski
Helper II
Helper II

Creation of two tables

From the data I want to create two tables

Both tables should show who fed any animal collectively other than the bear or camel more than 3 times
but one that the staff prepared the food at least once
and one that the staff never prepared the food...

I want to be able the get the percentage of day and night feeding which I should be able to do once I get these tables created

Any help on this?

Task IDStaff NameAnimalTimePrepared Food
F0001SteveBearDayNo
F0002JeffHorseNightYes
F0003JerryLionDayNo
F0004PeterTigerNightNo
F0005SteveBearDayNo
F0006JeffHorseNightNo
F0007JerryLionDayYes
F0008PeterTigerNightNo
F0009SteveBearDayNo
F0010JeffHorseNightNo
F0011JerryLionDayNo
F0012PeterTigerNightNo
F0013JeffBearDayYes
F0014JerryHorseNightNo
F0015JeffLionDayYes
F0016JerryTigerNightNo
F0017SteveBearDayNo
F0018JeffHorseNightNo
F0019JerryLionDayNo
F0020SteveTigerNightNo
F0021JeffBearDayNo
F0022JerryBearNightNo
F0023PaulLionNightYes
F0024PaulCamelDayNo
F0025PeterLionDayNo
F0026PeterCamelDayNo
1 ACCEPTED SOLUTION

I am having problems with the table creation, the table name is Feeding, even making those edits, I still get errors in the DAX

Never prepared food = countx(filter(Feeding, Feeding[Staff Name], "_1",count(Feeding[Staff Name]), "_2",calculate(Feeding[Staff Name], filter(Feeding, Feeding[Prepared Food] ="No")), [_1]=[_2])[Staff name])

 

 

"The syntax for '[Staff name]' is incorrect. (DAX(countx(filter(Feeding, Feeding[Staff Name], "_1",count(Feeding[Staff Name]), "_2",calculate(Feeding[Staff Name], filter(Feeding, Feeding[Prepared Food] ="No")), [_1]=[_2])[Staff name])))."

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@PaulPalkowski , Based on what is got, Try measures like

 

Day night ratio = divide(countrows(filter(table, Table[Time] ="Day")),countrows(filter(table, Table[Time] ="Night")))

Never prepared food = countx(filter(Tbale, Table[Staff Name], "_1",count(Table[Staff Name]), "_2",calculate(Table[Staff Name], filter(Table, Table[Prepared Food] ="No")), [_1]=[_2])[Staff name])

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

I am having problems with the table creation, the table name is Feeding, even making those edits, I still get errors in the DAX

Never prepared food = countx(filter(Feeding, Feeding[Staff Name], "_1",count(Feeding[Staff Name]), "_2",calculate(Feeding[Staff Name], filter(Feeding, Feeding[Prepared Food] ="No")), [_1]=[_2])[Staff name])

 

 

"The syntax for '[Staff name]' is incorrect. (DAX(countx(filter(Feeding, Feeding[Staff Name], "_1",count(Feeding[Staff Name]), "_2",calculate(Feeding[Staff Name], filter(Feeding, Feeding[Prepared Food] ="No")), [_1]=[_2])[Staff name])))."

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors