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

Day before as I selected in slider

Hi all,

 

I have a dashboard like this:

 

1



As you can see is shown the total orders and the total of the incidents per day. Showing by default the most recent day with data and day -1. 

The question is, when I'm using the sliders on the top,i have this result:

 

 

2

 

As you can see, the day -1 is showing blank.

 

The measure that I'm using for all the cards are:

 

Orders

 

Ordenesultimodia-1 = 
VAR _antedate = 
    MAX ( 'Dataset'[Transformed DATA] )-1
RETURN
    CALCULATE (
        count ( 'Dataset'[NumOE] );FILTER('Dataset';
        'Dataset_LuisSimões'[Transformed DATA] = _antedate
    ))

Incidents

 

 

Incidenciasultimodia-1 = 
VAR _antedate = 
    MAX ( 'Dataset'[Transformed DATA] )-1
RETURN
    CALCULATE (
        COUNT ( 'Dataset'[TIPO] );FILTER('Dataset;
        'Dataset'[Transformed DATA] = _antedate && LEFT( 'Dataset'[TIPO];2) = "AN"
))

Quality service

 

CS%dia-1 = 1-([Incidenciasultimodia-1]/[Ordenesultimodia-1])

I hope you can help me , I'm blocked.

1 ACCEPTED SOLUTION
v-danhe-msft
Employee
Employee

Hi @Anonymous,

Based on my test, your formula could work on my side:

Sample data:

1.PNG

Result:

1.PNG

In your picture, could you please check if there is a row or data in 2018/12/3?

 

Regards,

Daniel He

Community Support Team _ Daniel He
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

7 REPLIES 7
v-danhe-msft
Employee
Employee

Hi @Anonymous,

Based on my test, your formula could work on my side:

Sample data:

1.PNG

Result:

1.PNG

In your picture, could you please check if there is a row or data in 2018/12/3?

 

Regards,

Daniel He

Community Support Team _ Daniel He
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 @v-danhe-msft

 

Thanks for your help 🙂

 

I replicated your formula in my measure and works fine :-). My error was adding the command ALL in the date instead of in the count.

 

themistoklis
Community Champion
Community Champion

@Anonymous

 

Can you change the following formula:

MAX ( 'Dataset'[Transformed DATA] )-1

To this formula and see if it works?

CALCULATE ( MAX ( 'Dataset'[Transformed DATA] )-1, ALLSELECTED ( 'Dataset' ) )

 

Anonymous
Not applicable

@themistoklis

 

still showing blank like the previouse photo

 

Ordenesultimodia-1 = 
VAR _antedate = 
    CALCULATE( MAX ( 'Dataset'[Transformed DATA] )-1;ALLSELECTED('Dataset))
RETURN
    CALCULATE (
        count ( 'Dataset_[Nº OE] );FILTER('Dataset;
        'Dataset[Transformed DATA] = _antedate
    ))

@Anonymous

 

Can you share the file with us? Mask any sensitive data

Anonymous
Not applicable

@themistoklis

 

Imposible , Is not possible to share 😞

Anonymous
Not applicable

Any idea? I was checking and should be something related to the filter but I don't know how to avoid the filter for that measure.

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.