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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

adding measure to the table

Hi everyone! 

I experienced the problem with adding measure to the table view in power bi. I have original table with the data filters for the past 3 weeks:

pusova22_0-1640769408647.png

I added the measure calculating difference between some dates and inserting 0 if the data column is null; however, when I add this measure to the table, happens this:

pusova22_1-1640769495015.png

It shows unrelevant values with the wrong dates and etc. 

Help please! 

5 REPLIES 5
amitchandak
Super User
Super User

@Anonymous ,The information you have provided is not making the problem clear to me. Can you please explain with an example.
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

The table to which I need to add a measure which calculates difference between dates:

pusova22_0-1640771047627.png

I created measure which calculates the difference:  

Мера = IF(ISBLANK(SELECTEDVALUE(TT_INDeliveryData[sscc_disaggregated_ts])), 0, DATEDIFF(SELECTEDVALUE(TT_INDeliveryData[gtin_warehous_ts]), SELECTEDVALUE(TT_INDeliveryData[sscc_disaggregated_ts]),DAY))
 
And when a add this measure as a column to the table, it shows values not only for those rows which were in the previous screenshot, but also some irrelevant (maybe to the all values in the table from DWH):
pusova22_1-1640771149618.png

 

 

@Anonymous , Try like

 

Мера = IF(ISBLANK(SELECTEDVALUE(TT_INDeliveryData[sscc_disaggregated_ts])), blank() , DATEDIFF(SELECTEDVALUE(TT_INDeliveryData[gtin_warehous_ts]), SELECTEDVALUE(TT_INDeliveryData[sscc_disaggregated_ts]),DAY))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

It is still shows not all values from the original table:

pusova22_0-1640778508398.png

 

Hi, @Anonymous 

Can you post some sample data in table form or pbix file(without sensitive data) and your expected result for further research? Also, if there are related mesure fields in the table visual, please share related formulas.

 

Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.