Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anusha__v
Helper I
Helper I

Power bi firstnonblank showing differently

Hi,
Power bi first nonblank is used if condition in power bi service is showing values ever as in local I am getting 0.
The dashboards are the same in Local and Service.
Calculation Measure used

Test =

VAR Value1=IF(FIRSTNONBLANK(ABC[Target],0)="YES",0,sum(ABC[Weightage]))

RETURN

Value1

 

1 ACCEPTED SOLUTION

Hi, @Anusha__v 

Sorry, I misunderstood your question at first.

I created a new column index, avoided automatic aggregation of views and tested their differences between desktop and service. At the same time, I created a measure and a calculated column to compare, using the case of 0. Because in the case of a measure or calculated column that results as a null value, the view automatically aggregates and doesn't show anything.

In desktop:

vyohuamsft_0-1715156124222.png

In service:

vyohuamsft_1-1715156151983.png

 

After testing, they are not different.

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

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

3 REPLIES 3
v-yohua-msft
Community Support
Community Support

Hi, @Anusha__v 
Based on your information, I create a sample table.

vyohuamsft_1-1715132370706.png

 

If you want to calculate the sum of the measure only if it is Yes, you can try the following DAX:

Measure = IF(FIRSTNONBLANK('Table'[Target],0)="Yes",BLANK(),SUM('Table'[Weight]))

vyohuamsft_0-1715132323424.png

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Yongkang,
Thanks for Looking into it, I have the data below. After adding the calculation 

 IF(FIRSTNONBLANK('Table'[Target],0)="Yes",BLANK(),SUM('Table'[Weight]))



Table Level

Target

Weightage 

YES

85

YES

 

YES

85

YES

85

YES

15

YES

 

YES

85

In Local/Powerbi Desktop

Target

Weightage 

YES

 

YES

 

YES

 

YES

 

YES

 

YES

 

YES

 

in Power bi Service

Target

Weightage 

YES

85

YES

 

YES

85

YES

85

YES

 

YES

 

YES

85


With the same measure why it's showing Differently results in Local compared to Power Bi Service?

 

Hi, @Anusha__v 

Sorry, I misunderstood your question at first.

I created a new column index, avoided automatic aggregation of views and tested their differences between desktop and service. At the same time, I created a measure and a calculated column to compare, using the case of 0. Because in the case of a measure or calculated column that results as a null value, the view automatically aggregates and doesn't show anything.

In desktop:

vyohuamsft_0-1715156124222.png

In service:

vyohuamsft_1-1715156151983.png

 

After testing, they are not different.

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Find out what's new and trending in the Fabric Community.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors