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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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