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
BhavyaM
Helper V
Helper V

KPI for blank

Hi Friends,

CompanyCurrentPreviousPercentageTrend
A1020-1Down arrow
B90302Uparrow
C    
D130402.25Uparrow

If there is data then below i am getting as expected.

2.PNG

But, I want to show Like below if there is no values.

1.PNG

Trend =
VAR _Trend = CALCULATE(SUM('Table'[Percentage]))
Return
IF(_Trend > 0 ,UNICHAR(9650) ,
IF(_Trend <= 0 ,UNICHAR(9660),
Blank()
))

 

Here, Condition is i should not convert Blanks to Zero.

 

Please help. Its an Urgent requirement

 

Thanks in advance.

 

1 ACCEPTED SOLUTION

@BhavyaM 

Try this modified measure:

 

_Trend = 
SWITCH( TRUE(),
    [_Diff] = 0, UNICHAR(9660),
    [_Diff] = BLANK(), "",   
    [_Diff] > 0 ,UNICHAR(9650) ,
    [_Diff] < 0 ,UNICHAR(9660)
)

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

I accept KUDOS 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

13 REPLIES 13
Fowmy
Super User
Super User

@BhavyaM 

Modify your trend measure like:

Trend = 
VAR _Trend = CALCULATE(SUM('Table'[Percentage]))
Return
SWITCH( TRUE(),
    _Trend = BLANK(), "",
    _Trend > 0 ,UNICHAR(9650) ,
    _Trend <= 0 ,UNICHAR(9660)
)



________________________

Did I answer your question? Mark this post as a solution, this will help others!.

I accept KUDOS 🙂

YouTube, LinkedIn

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

@Fowmy 

 

I tried this,

 

But i am getting (Blank) for Percentage column in the advanced card visual.

 

 

@BhavyaM 

Share you a sample PBIX file to simulating the issue?

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

I accept KUDOS 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

@Fowmy 

 

I am not able to upload my Pbix file.

@BhavyaM 

You can drop it in One Drive or Google Drive then share the link here.

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

I accept KUDOS 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

@Fowmy

Please find the link below

https://1drv.ms/u/s!AsqJ-rVwhHrhaBtF_Sn9m6W2LUk 

 

Thanks in advance

@BhavyaM 

Hi,

I modified the Formula for _Diff: Try this

_Diff = 

VAR diff = DIVIDE([_Current]-[_Previous],[_Previous])

return

IF(ISBLANK(diff),"",diff)

 

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

I accept KUDOS 🙂

YouTube, LinkedIn

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

 @Fowmy 

 

I have tested the same query. 

But if the percentage is 0% then i am not getting any KPI icon. 

If Greater than 0% then my result is Update arrow and 

If less than 0% then Down arrow and

If blank() then ""

 

@BhavyaM 

What do like to see if the KPI is ZERO?


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Red colour Down arrow

@BhavyaM 

Try this modified measure:

 

_Trend = 
SWITCH( TRUE(),
    [_Diff] = 0, UNICHAR(9660),
    [_Diff] = BLANK(), "",   
    [_Diff] > 0 ,UNICHAR(9650) ,
    [_Diff] < 0 ,UNICHAR(9660)
)

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

I accept KUDOS 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

@Fowmy 

 

Thank you very much it help me and working now.

 

I am facing one issue in Data set refresh time, Can you please help me. this is very urgent requiremnt which i need to fix this soon. I am trying but not getting solution.

I used below Query to show the Last Data reset refresh time.

let
Source=Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("VZDLCQAhDAV78Sxonv9axP7bWLNPMN4mDMYhc7oUBAFRmvNOJBTy8r8RnTpNJh8TdRo0iUzT94BIIeTzRBdAaBr5GF0A0FTyMZqGdNM2mwDkG7CZZuhQKEA2ZdWI+pQ1U9ae/7v5v9vTYNzTYNiyFG/Z5rU+", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [dtDSTStart = _t, dtDSTEnd = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"dtDSTStart", type date}, {"dtDSTEnd", type date}}),
varCurrentDate = DateTime.Date(DateTimeZone.SwitchZone(DateTimeZone.LocalNow(),+4)),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each [dtDSTStart] < varCurrentDate and [dtDSTEnd] > varCurrentDate),
varDSTOffset = Table.RowCount(#"Filtered Rows"),
#"Last Refresh Date" = #table(
type table
[
#"RefreshDate"=datetimezone
],
{
{DateTimeZone.SwitchZone(DateTimeZone.LocalNow(),+4 + varDSTOffset,0)}
}
)
in
#"Last Refresh Date"

I used below measure

Last Update = "Last Update on " & UNICHAR(10) & FORMAT(MAX('Refresh Time Stamp'[RefreshDate]),"MMM DD, YYYY H:MM AM/PM")

But i am getting 30mins difference. For example, My Data set refresh time is "26/07/2020 8:30pm" and My system date and Time also same but my measure is showing me "26/07/2020 8:00PM".

How to show the date and time as per the Refresh date and time.

Please help me.

Thanks in advance.

@BhavyaM 

 

Try adjusting the +4 in your query 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

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.