Forum Discussion
Selection filter
- 5 years ago
Shinu1
Please use this measure:VisibleFlag = VAR _VIEW = SELECTEDVALUE(Criteria[View]) VAR _SOURCE = SELECTEDVALUE('Raw Data'[Source]) VAR _DATE = SELECTEDVALUE('Raw Data'[Date]) RETURN IF( _VIEW = "Const", IF(_SOURCE = "Altn" && _DATE <= DATE(2020,3,31),1,0), IF( _VIEW = "Org", IF( _SOURCE = "Altn" && ( (_DATE >= DATE(2019,1,1) && _DATE <= DATE(2019,3,31)) || (_DATE >= DATE(2020,1,1) && _DATE <= DATE(2020,3,31)) ) ,1 , 0) , 0 ) )________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
Shinu1
Create the following measure, and assign it to the visual filter of the table visual and set to = 0
You can download the file: HERE
VisibleFlag =
VAR _VIEW = SELECTEDVALUE(Criteria[View])
VAR _SOURCE = SELECTEDVALUE('Raw Data'[Source])
VAR _DATE = SELECTEDVALUE('Raw Data'[Date])
RETURN
IF( _VIEW = "Const",
IF(_SOURCE = "Altn" && _DATE <= DATE(2020,3,31),1,0),
IF( _VIEW = "Org",
IF( _SOURCE = "Altn" && NOT(_DATE >= DATE(2019,1,1) && _DATE <= DATE(2019,3,31)) && NOT(_DATE >= DATE(2020,1,1) && _DATE <= DATE(2020,3,31)),1,0)
,
0
)________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
Hi Fowmy,
Is it possible that i do this workout without creating a measure just by creating relationships ?
I checked the output, the Const and Pro selection looks fine but the Org selection is showing incorrect output.
if Source = Altn and dates between 1st Jan 2019 to 31st Mar 2019 and 1st Jan 2020 to 31st Mar 2020 must not be displayed.
The Org output should look like the below table
| Source | Date | Ext Rev |
| GFS | 11/1/2019 | 182 |
| GFS | 1/1/2020 | 102 |
| NONGFS | 1/1/2019 | 151 |
| Altn | 4/1/2019 | 127 |
| Altn | 5/1/2019 | 199 |
| Altn | 4/1/2020 | 197 |
| Altn | 5/1/2020 | 122 |
| Total | 1080 |
Regards
Shinu
- Fowmy5 years agoSuper User
Shinu1
Please use this measure:VisibleFlag = VAR _VIEW = SELECTEDVALUE(Criteria[View]) VAR _SOURCE = SELECTEDVALUE('Raw Data'[Source]) VAR _DATE = SELECTEDVALUE('Raw Data'[Date]) RETURN IF( _VIEW = "Const", IF(_SOURCE = "Altn" && _DATE <= DATE(2020,3,31),1,0), IF( _VIEW = "Org", IF( _SOURCE = "Altn" && ( (_DATE >= DATE(2019,1,1) && _DATE <= DATE(2019,3,31)) || (_DATE >= DATE(2020,1,1) && _DATE <= DATE(2020,3,31)) ) ,1 , 0) , 0 ) )________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
- Shinu15 years agoHelper IIThankyou very much Fowmy. The output looks good.