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

Blank Total

Hi,

I have this measure

 

measure=
VAR dates =
    MAX('Posting Date'[Date] ) 
Return
CALCULATE(
COUNTROWS( 'Job' ),
Filter('Duration Entry' ,
'Duration Entry'[Start DateTime Local] <= dates + 21 / 24
&& 'Duration Entry'[End DateTime Local] ='Duration Entry'[Start DateTime Local]
&& 'Duration Entry'[Entry Number] = MAX( 'Duration Entry'[Entry Number])
&& 'Duration Entry'[Parts Available Not Booked Flag] = 1
 
)
)

it returns Blank in the total, but when I remove this part :

'Duration Entry'[Entry Number] = MAX( 'Duration Entry'[Entry Number])
 
it shows the total, but it is not the correct figure because I have remove that filter. I guess this filter is causing the issue.
I want the correct total regardless of the context filter.

Can someone help?
Sorry I can't provide the pbxi file because I am using tabular model.

 

 

5 REPLIES 5
v-yuaj-msft
Community Support
Community Support

Hi @Anonymous ,

 

Based on your desccriptions, it seems that you have used three table to create this measure. So what's the relationship between these tables?

Do you mean "&& 'Duration Entry'[Entry Number] = SelectedValue( 'Duration Entry'[Entry Number])" in the following formula?

v-yuaj-msft_0-1618817122189.png

The information you have provided is not making the problem clear to me. Could you please share some sample data (sample Excel file or screenshot as well) and the expected result to have a clear understanding of your question? I can do some tests for you.

You can save your files in some cloud sharing platforms and share the link here.

How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

Best Regards,

Yuna

jdbuchanan71
Super User
Super User

What do you get in the total row if you put in this measure?

Max Entry Number = MAX ( 'Duration Entry'[Entry Number] )

 

jdbuchanan71
Super User
Super User

@Anonymous 

I'm wondering if it is a context problem, try adding a CALCULATE around the MAX( 'Duration Entry'[Entry Number]) )

measure =
VAR dates =
    MAX ( 'Posting Date'[Date] )
RETURN
    CALCULATE (
        COUNTROWS ( 'Job' ),
        FILTER (
            'Duration Entry',
            'Duration Entry'[Start DateTime Local] <= dates + 21 / 24
                && 'Duration Entry'[End DateTime Local] = 'Duration Entry'[Start DateTime Local]
                && 'Duration Entry'[Entry Number] = CALCULATE ( MAX ( 'Duration Entry'[Entry Number] ) )
                && 'Duration Entry'[Parts Available Not Booked Flag] = 1
        )
    )

 

Anonymous
Not applicable

Hi @jdbuchanan71 ,

I tried it but it is not working, it acts as that filter is not there.

Anonymous
Not applicable

it did not, I hav created calculated column to indicated if it is a max date and then use this flag.

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