Forum Discussion
Need to create a visual equivalent to minus in SQL
- Anonymous4 years ago
Hi rohtashgoyal ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want.
1. Create two date dimension tables and apply the date field on the date slicers
2. Create a measure as below
Flag = VAR _date1 = SELECTEDVALUE('Attend on'[Date]) VAR _date2 = SELECTEDVALUE('Not attend on'[Date]) VAR _tab1 = CALCULATETABLE ( VALUES ( 'Table'[name] ), FILTER ( 'Table', 'Table'[date] = _date1 ) ) VAR _tab2 = CALCULATETABLE ( VALUES ( 'Table'[name] ), FILTER ( 'Table', 'Table'[date] = _date2 ) ) RETURN IF ( SELECTEDVALUE ( 'Table'[name] ) IN EXCEPT ( _tab1, _tab2 ), 1, 0 )3. Create a visual and apply a visual-level filter with the condition(Flag is 1)
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
if will be great if I can have two drop down filtes to select dates, so that users have flexibility.