The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
Solved! Go to Solution.
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
Use New measure :
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
Hi Pyshglulr,
Try creating a custom column (Today date ) in power query editor itself.
Hi Swati,
I am using LIVE CONNECTION.
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
@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])))
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
User | Count |
---|---|
82 | |
81 | |
37 | |
34 | |
32 |
User | Count |
---|---|
96 | |
79 | |
61 | |
51 | |
51 |