cancel
Showing results for 
Search instead for 
Did you mean: 
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
Super User
Super User

Hi @jlandsm4785,

Would you be able to provide some example data?

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors