This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi Everyone,
I created a measure using below query. Logic wise it is correct but the only thing I am facing right now is that It is returning all the rows from the table. What I observe is I am getting this output because in Var R1 and R2 I am doing some calculation. As you can see below i am adding 1 and also multiplying it with 10. This is applying to each row in the table. Can someone please let me know how should I write R1 and R2.
I also have a date slicer in the report page. where I am selecting only 1 date.
IndexBaseValue =
Var Mindate = CALCULATE(MIN(IndexFundNAV[Date]),ALL(IndexFundNAV[Date]))
Var Maxdate = CALCULATE(MAX(IndexFundNAV[Date]))
Var Currentdate = IF(Maxdate<Mindate,Mindate,Maxdate)
Var Diffdays = DATEDIFF(Mindate,Currentdate,DAY)
Var R1 = CALCULATE(10*(1+[RITD%]))
Var R2 = CALCULATE((10*(1+[RITD%]))^(Diffdays/365))
Var Result = if (Diffdays<365,R1,R2)
Return
Result
Example for desired output:
Date IndexName IndexBaseValue
28-Sep-19 ABC 8.9
Currently getting:
Date IndexName IndexBaseValue
28-Sep-19 ABC 10
28-Sep-19 ABC 10
28-Sep-19 ABC 10
28-Sep-19 ABC 8.9
@Anonymous - A little difficult to tell what is going on, sample source data might help.
Check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Thanks @Greg_Deckler for your reply. I will check the links which you have shared. However my issue got resolved. There was some table relatioship issue was there because of that the measure not returing the correct answer.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |