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

How to add any measure in table visual

Hi All,

 

Greetings!!!

 

I have been working on a Power BI report, where I have a table visual with some columns from dimension and fact tables.

Out of these columns, there is one column named "Offer End Date". I need another column named "Today" that shows current date and "DaysRemaining" which shows the difference between the two date columns.

DImension -> 12568 rows
Fact -> 17 rows (test data)
For this, I created one measure "#Today := TODAY()" and added it to the table visual. As soon as I add the column, the rows get duplicated. Ideally, the table visual should show only 17 rows, but after addition of measure in table visual, the row count has increased drastically.
I am using LIVE Connection.

 

Please suggest how can I solved this issue.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @Anonymous,

It sounds like measure expression expands your records hidden by power bi.
If that is the case, I'd like to suggest you add 'if statement' to your formula to check if the current fact table exists in correspond records.

Measure =
VAR curr =
    CALCULATE ( SUM ( Fact[Amount] ), VALUES ( Table[Date] ) )
RETURN
    IF ( curr <> BLANK, TODAY )

Regards,

Xiaoxin Sheng

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Use New measure : 

Difference = DATEDIFF( SELECTEDVALUE('Fact'[offer end date]),TODAY(),DAY)
swathi_20_0-1616403417336.png

 

Anonymous
Not applicable

Hi Swati,

 

Thanks for the support.

I am able to get the date difference working fine. But still, I am unable to get TODAY's date. Difference is working as expected but Today is still duplicating data.

 

Regards

Anonymous
Not applicable

Hi Pyshglulr,

 

Try creating a custom column (Today date ) in power query editor itself.

swathi_20_0-1616404484870.png

 

Anonymous
Not applicable

Hi Swati,

 

I am using LIVE CONNECTION.

Anonymous
Not applicable

HI @Anonymous,

It sounds like measure expression expands your records hidden by power bi.
If that is the case, I'd like to suggest you add 'if statement' to your formula to check if the current fact table exists in correspond records.

Measure =
VAR curr =
    CALCULATE ( SUM ( Fact[Amount] ), VALUES ( Table[Date] ) )
RETURN
    IF ( curr <> BLANK, TODAY )

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@Anonymous , It should not do that. Try like the right click on fact, create a new measure then try and see does it make any difference.

Or try a measure like

calculate(Today(), filter(fact, not(isblank([measure])))

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

Hi Amit,

 

Thanks for looking into the issue.

 

I have tried creating measure on fact table and dimension table. It doesn't make any difference.
Also, I have created the meausre TODAY as you suggested, but to no avail. 

I am still stuck at this.

Regards

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.

Top Solution Authors