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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors