cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DSiffredi Frequent Visitor
Frequent Visitor

Measure showing blanks when changing context from days to months

Hi there, I hope someone can help here...
 
Scheduled Sales =
VAR Last Billable Date = CALCULATE(MAX(Sales[Date]) ,ALL(Sales))
RETURN
IF(SELECTEDVALUE(Date[Date]) <Last Billable Date , BLANK(),
CALCULATE([Future Sales]))
 
the DAX statement above intends to aggregate future sales when the day is bigger than the last day we have a sale registered. Calculate function on future sales works like a charm.
This DAX statement indeed works well if the context is days , but shows nothing if the context changes from days to months. What am I doing wrong that everything looks fine and works with the context of days but nothing if the context are months?
I'd expect to have the aggregation of days in a month and show that as a results instead of blanks.
 
thanks for your time
Daniel
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Measure showing blanks when changing context from days to months

@DSiffredi,

 

SELECTEDVALUE returns the value when there’s only one value in the specified column, otherwise returns the alternate result. Here BLANK is returned. You may use MAX instead.

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
DSiffredi Frequent Visitor
Frequent Visitor

Re: Measure showing blanks when changing context from days to months

BTW: Here's a couple of screenshots showing what I meant 

 

shows numbers when by date.PNGas you can see it shows Scheduled Sales when slicing by daysnot showing numbers when by month.PNGNot showing any values or agregations when slicing by Months (FYFM in this case)

Community Support Team
Community Support Team

Re: Measure showing blanks when changing context from days to months

@DSiffredi,

 

SELECTEDVALUE returns the value when there’s only one value in the specified column, otherwise returns the alternate result. Here BLANK is returned. You may use MAX instead.

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
DSiffredi Frequent Visitor
Frequent Visitor

Re: Measure showing blanks when changing context from days to months

that worked like a charm Smiley Happy. Thank you so much for taking the time to help me with this!

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 132 members 1,746 guests
Please welcome our newest community members: