Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Solved! Go to Solution.
Hello @Rahp
try this measure
Options Entered Lots (Open as of Date) =
VAR SelectedStrike = SELECTEDVALUE('Final MO MCX Options'[Strike])
VAR SelectedExpiry = SELECTEDVALUE('Final MO MCX Options'[Expiry Date])
VAR SelectedType = SELECTEDVALUE('Final MO MCX Options'[Type])
VAR SelectedLongShort = SELECTEDVALUE('Final MO MCX Options'[Long / Short])
VAR SelectedDate = MAX('DateTable'[Date]) -- will work even with ranges
RETURN
CALCULATE(
SUM('Final MO MCX Options'[Lots]),
FILTER(
ALL('Final MO MCX Options'),
'Final MO MCX Options'[Strike] = SelectedStrike &&
'Final MO MCX Options'[Expiry Date] = SelectedExpiry &&
'Final MO MCX Options'[Type] = SelectedType &&
'Final MO MCX Options'[Long / Short] = SelectedLongShort &&
'Final MO MCX Options'[Entry Date] <= SelectedDate &&
(
ISBLANK('Final MO MCX Options'[Exit Date]) ||
'Final MO MCX Options'[Exit Date] > SelectedDate
)
)
)
Thanks,
Pankaj Namekar | LinkedIn
If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
Hi @Rahp ,
Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You
Hi @Rahp ,
Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You
Hi @Rahp ,
Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You
Hi @Rahp ,
Try using-
Options Entered Lots (Open as of Date) =
VAR SelectedStrike = SELECTEDVALUE('Final MO MCX Options'[Strike])
VAR SelectedExpiry = SELECTEDVALUE('Final MO MCX Options'[Expiry Date])
VAR SelectedType = SELECTEDVALUE('Final MO MCX Options'[Type])
VAR SelectedLongShort = SELECTEDVALUE('Final MO MCX Options'[Long / Short])
VAR SelectedDate = MAX('DateTable'[Date]) -- latest date selected in the slicer
RETURN
CALCULATE(
SUM('Final MO MCX Options'[Lots]),
FILTER(
ALL('Final MO MCX Options'),
'Final MO MCX Options'[Strike] = SelectedStrike &&
'Final MO MCX Options'[Expiry Date] = SelectedExpiry &&
'Final MO MCX Options'[Type] = SelectedType &&
'Final MO MCX Options'[Long / Short] = SelectedLongShort &&
'Final MO MCX Options'[Entry Date] <= SelectedDate &&
(
ISBLANK('Final MO MCX Options'[Exit Date]) ||
'Final MO MCX Options'[Exit Date] > SelectedDate
)
)
)
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You!
Hello @Rahp
try this measure
Options Entered Lots (Open as of Date) =
VAR SelectedStrike = SELECTEDVALUE('Final MO MCX Options'[Strike])
VAR SelectedExpiry = SELECTEDVALUE('Final MO MCX Options'[Expiry Date])
VAR SelectedType = SELECTEDVALUE('Final MO MCX Options'[Type])
VAR SelectedLongShort = SELECTEDVALUE('Final MO MCX Options'[Long / Short])
VAR SelectedDate = MAX('DateTable'[Date]) -- will work even with ranges
RETURN
CALCULATE(
SUM('Final MO MCX Options'[Lots]),
FILTER(
ALL('Final MO MCX Options'),
'Final MO MCX Options'[Strike] = SelectedStrike &&
'Final MO MCX Options'[Expiry Date] = SelectedExpiry &&
'Final MO MCX Options'[Type] = SelectedType &&
'Final MO MCX Options'[Long / Short] = SelectedLongShort &&
'Final MO MCX Options'[Entry Date] <= SelectedDate &&
(
ISBLANK('Final MO MCX Options'[Exit Date]) ||
'Final MO MCX Options'[Exit Date] > SelectedDate
)
)
)
Thanks,
Pankaj Namekar | LinkedIn
If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
| User | Count |
|---|---|
| 59 | |
| 47 | |
| 31 | |
| 18 | |
| 17 |
| User | Count |
|---|---|
| 77 | |
| 66 | |
| 46 | |
| 22 | |
| 22 |