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
Anonymous
Not applicable

WTD Sales and WTD count calculation

Hi,

 

I'm trying to WTD sales and count of entries for same time period. Here's the couple of DAXs i'm using for WTD sales:

 

1) WTD = CALCULATE(SUM('SaT data'[Total Value]),FILTER('SaT data', DATESINPERIOD('SaT data'[EffectiveCloseDate],TODAY(),-7,DAY)))
 
2) 
WTD = IF (

HASONEVALUE ( 'Calendar'[Year] )

&& HASONEVALUE ('Calendar'[Fiscal Week]),

CALCULATE (

SUM ( 'SaT data'[Total Value]),

FILTER (

ALL ( 'Calendar' ),

'Calendar'[Year] = VALUES ( 'Calendar'[Year] )

&& 'Calendar'[Fiscal Week] = VALUES ( 'Calendar'[Fiscal Week] )

&& 'Calendar'[Date] <= MAX ( 'Calendar'[Date] )

)

),

BLANK ()

)
 
With both DAX queries, i'm getting a "Blank" value.
 
Can anyone help me with the correct query to get the numbers?
 
Thanks in advance!
3 REPLIES 3
v-robertq-msft
Community Support
Community Support

Hi, @Anonymous 

According to your DAX formula, it seems don’t have any problem. It’s hard to tell why it shows blank, I think the first you should check is whether there is data in the time period you requested.

If you still have a problem, would you like to post some sample data(without sensitive data) and your expected result so that we can help you in advance and figure out where the problem is?

How to Get Your Question Answered Quickly 

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi @amitchandak , I've been through the links but it isn't giving me any results with the queries in the blog.

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.