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

Card showing an unknown value

Hi Bi Community.

I have a table that has two columns:
Column 1 = week end date
Column 2 = value

Both columns 1 and 2 are pulled from an excel spreadsheet dynamically.

I'm using the measure that I've posted below but when I display this in a card it gives me a value of 5423. I have absolutely no idea where this value is coming from.

I've attached pics of the table and the last few values from the excel spreadsheet where 'Weekly average Packs Per Hr' [Weekly hourly average] pulls the data . 

The desired end result is: find last none blank value from 'Weekly average Packs Per Hr' [weekly hourly average], show this & update dynamically as the excel spreadsheet updates.

 

29/05/20223829
05/06/20223953
12/06/20223857
19/06/20223834
26/06/20223781
03/07/20223955
10/07/20222737
17/07/20223507
24/07/20223681
31/07/20223534
07/08/20223749
14/08/20223760
21/08/20223257
28/08/20223783
04/09/20223961
11/09/20223971
18/09/20223855
25/09/20223913
02/10/20224055
09/10/20224169
16/10/20224031
23/10/20223993
30/10/2022 
06/11/2022 
13/11/2022 
20/11/2022 
27/11/2022 
04/12/2022 
11/12/2022 

 

relationship.png

 

table .png

 

card.png

 

 

 

 

1 ACCEPTED SOLUTION

I think the problem is in ISBLANK function, that requires a column as argument

 

NOT ISBLANK('Table'[Column])

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

@mangaus1111, thank you for your response. I've tried it but now getting a syntax error and cannot figure out why. Any ideas? I'm new to power Bi. Sorry. 

 

 

 

Measure = 
VAR _MaxDate = MAXX(
        FILTER('Weekly average Packs Per Hr',
            NOT ISBLANK('Weekly average Packs Per Hr')
        ),
'Weekly average Packs Per Hr'[Week End Date]
)
RETURN
CALCULATE(MIN('Weekly average Packs Per Hr'[Weekly hourly average]),'Weekly average Packs Per Hr'[Week End Date]=_MaxDate
)  

 

measure for forum.png

I think the problem is in ISBLANK function, that requires a column as argument

 

NOT ISBLANK('Table'[Column])

Anonymous
Not applicable

@mangaus1111 It works.  despite the error the measure actually works when I pull it onto a card. 

 

thank you so much for your help. 

Anonymous
Not applicable

@mangaus1111 still no joy. same syntax error. 

Measure = 
VAR _MaxDate = MAXX(
        FILTER('Weekly average Packs Per Hr',
            NOT ISBLANK('Weekly average Packs Per Hr'[Weekly hourly average])
        ),
'Weekly average Packs Per Hr'[Week End Date]
)
RETURN
CALCULATE(MIN('Weekly average Packs Per Hr'[Weekly hourly average]),'Weekly average Packs Per Hr'[Week End Date]=_MaxDate
) 

measure for forum.png

mangaus1111
Solution Sage
Solution Sage

Hi @Anonymous ,

try this measure

Measure =
VAR _MaxDate = MAXX(
                   FILTER('Facts48',
                           NOT ISBLANK('Facts48'[Value])
                     ),
'Facts48'[Date]
)
RETURN
CALCULATE(MIN('Facts48'[Value]),'Facts48'[Date]=_MaxDate
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

last value (1) =
VAR __A =
MAX( 'Weekly average Packs Per Hr'[Week End Date] )
VAR __B =
CALCULATE(
MAX('Weekly average Packs Per Hr'[Week End Date] ) ,
FILTER(ALLSELECTED('Weekly average Packs Per Hr'), 'Weekly average Packs Per Hr'[Week End Date] < __A && 'Weekly average Packs Per Hr'[Weekly hourly average] <> BLANK() )
)
RETURN
IF (
ISBLANK ( MAX('Weekly average Packs Per Hr'[Weekly hourly average] )),
CALCULATE( MAX( 'Weekly average Packs Per Hr'[Weekly hourly average]), FILTER(ALLSELECTED('Weekly average Packs Per Hr'), 'Weekly average Packs Per Hr'[Week End Date] = __B ) ) ,
MAX('Weekly average Packs Per Hr'[Weekly hourly average] )
)

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.