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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
jlandsm4785
Frequent Visitor

Week Number - A table of multiple values was supplied where a single value was expected

Hello,

 

I am trying to create a table visualization that shows the week number for a date coming a column full of dates.  The best i can do is get one date to appear using either the LASTNONBLANK function, but i cannot get more than one value to show. Instead I get the following error "A table of multiple values was supplied where a single value was expected".  Is the weeknum function unable to cycle through column and produce more than one value?  Any guidance is appreciated, thanks

 

Here is my code to try and produce the table:

 

DateMeasure = CALCULATE(WEEKNUM(ALLNOBLANKROW(ShiftData[WeekEnding]),1))
1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @jlandsm4785 ,

Do you want to the week number of the field [WeekEnding]? If yes, you can create a calculated column as below to get it:

yingyinr_0-1660811114912.png

Or you can update the formula of your measure [DateMeasure] as below:

DateMeasure = WEEKNUM(MAX(ShiftData[WeekEnding]),1)

yingyinr_1-1660811296675.png

Best Regards

Community Support Team _ Rena
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
v-yiruan-msft
Community Support
Community Support

Hi @jlandsm4785 ,

Do you want to the week number of the field [WeekEnding]? If yes, you can create a calculated column as below to get it:

yingyinr_0-1660811114912.png

Or you can update the formula of your measure [DateMeasure] as below:

DateMeasure = WEEKNUM(MAX(ShiftData[WeekEnding]),1)

yingyinr_1-1660811296675.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Seanan
Solution Supplier
Solution Supplier

Hi @jlandsm4785,

Would you be able to provide some example data?

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Kudoed Authors