Forum Discussion
Compare folder datasets and visualize the data by date
- 7 years ago
HI Anonymous ,
I was abble to do a approach to what you may want but this is just to help you think to give you a better way I would need further details on the expected outcome.
- Create a calendar table withou relation to your dataset
- Now create the following measure:
ON / OFF = VAR Selected_DAte = MAX ( 'Calendar'[Date] ) RETURN IF ( CALCULATE ( COUNT ( Table1[SystemNames] ); FILTER ( ALL ( Table1[Date] ); Table1[Date] <= Selected_DAte ) ) > 1; "Existing"; IF ( CALCULATE ( COUNT ( Table1[SystemNames] ); FILTER ( ALL ( Table1[Date] ); Table1[Date] <= Selected_DAte ) ) = 1 && CALCULATE ( COUNT ( Table1[SystemNames] ); FILTER ( ALL ( Table1[Date] ); Table1[Date] = Selected_DAte ) ) = 1; "New"; IF ( CALCULATE ( COUNT ( Table1[SystemNames] ); FILTER ( ALL ( Table1[Date] ); Table1[Date] < Selected_DAte ) ) = BLANK (); "Not Existing"; "Off" ) ) )- Use the calendar table as a slicer and then use the measure you created as a filter or a field in your visuals.
This measure can be changed to use number instead of texts to make calculations of quantities and not text values, believe that everything is working for picking up previous values and not existing in a certain date but may need adjustments.
Check attach PBIX file.
Regards,
MFelix
HI Anonymous ,
I was abble to do a approach to what you may want but this is just to help you think to give you a better way I would need further details on the expected outcome.
- Create a calendar table withou relation to your dataset
- Now create the following measure:
ON / OFF =
VAR Selected_DAte =
MAX ( 'Calendar'[Date] )
RETURN
IF (
CALCULATE (
COUNT ( Table1[SystemNames] );
FILTER ( ALL ( Table1[Date] ); Table1[Date] <= Selected_DAte )
) > 1;
"Existing";
IF (
CALCULATE (
COUNT ( Table1[SystemNames] );
FILTER ( ALL ( Table1[Date] ); Table1[Date] <= Selected_DAte )
) = 1
&& CALCULATE (
COUNT ( Table1[SystemNames] );
FILTER ( ALL ( Table1[Date] ); Table1[Date] = Selected_DAte )
) = 1;
"New";
IF (
CALCULATE (
COUNT ( Table1[SystemNames] );
FILTER ( ALL ( Table1[Date] ); Table1[Date] < Selected_DAte )
)
= BLANK ();
"Not Existing";
"Off"
)
)
)
- Use the calendar table as a slicer and then use the measure you created as a filter or a field in your visuals.
This measure can be changed to use number instead of texts to make calculations of quantities and not text values, believe that everything is working for picking up previous values and not existing in a certain date but may need adjustments.
Check attach PBIX file.
Regards,
MFelix
- Anonymous7 years agoNot applicable
MFelix I'm going to try this out. Thank you for your help!