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
Alltasks_Chris
Frequent Visitor

Visualise a List or Column style result

Can anyone tell me what this means: 

 

Alltasks_Chris_0-1659573783759.png

I'm trying to see if a measure I made even works but I can't figure out how to visualize it - here's my measure:

 

ThisWeekDays =
            
            VAR TodayNo = WEEKDAY(TODAY(), 3)
            VAR StartOfWeek = TODAY() - TodayNo
            VAR weekdays = DATESBETWEEN('Calendar'[Date], StartOfWeek, TODAY())
            
            RETURN weekdays
 
I'm hoping it returns something like [0] if it's Monday, [0, 1] if it's Tuesday, [0, 1, 2, 3, 4] if it's Friday...etc
1 ACCEPTED SOLUTION

Hi @Alltasks_Chris ,

What you need to create is a calculated table not a measure, since the result will return multiple values....

yingyinr_0-1659947527593.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

5 REPLIES 5
Alltasks_Chris
Frequent Visitor

There are no logic errors in my Measure but it returns a table with multiple values instead of one and that's my intention, the end goal I'm going for won't actually use this measure at the moment I'm just trying to physically see the results of my above DAX to ensure it's getting the results I think it should be.

Hi @Alltasks_Chris ,

What you need to create is a calculated table not a measure, since the result will return multiple values....

yingyinr_0-1659947527593.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.

Thankyou, that's exactly what I needed. My DAX isn't doing what I thought it was but this is how I could see what it is doing to continue to troubleshoot - thankyou!

technolog
Super User
Super User

I think that you should use MAX function

ThisWeekDays =
            
            VAR TodayNo = WEEKDAY(TODAY(), 3)
            VAR StartOfWeek = TODAY() - TodayNo
            VAR weekdays = DATESBETWEEN(MAX('Calendar'[Date])StartOfWeekTODAY())
            
            RETURN weekdays

Thanks but MAX doesn't work in that context the first argument for DATESBETWEEN is the column containing the dates https://docs.microsoft.com/en-us/dax/datesbetween-function-dax

Alltasks_Chris_0-1659574929415.png

 

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.

Top Solution Authors