Forum Discussion
Matching Date and time with another table
- Anonymous3 years ago
Hi sam_rea_02 ,
I created a sample pbix file(see the attachment), please check if that is what you want.
1. Unpivot the date columns of query "Fcast"
2. Create a calculated table as below
Table = UNION(DISTINCT('Forecast'),SUMMARIZE('Raw','Raw'[HOUR],'Raw'[HALF HOUR],'Raw'[QUARTER HOUR],Raw[SKILL]))3. Create a measure as below
Forecast = VAR _halfhour = SELECTEDVALUE ( 'Table'[HALF HOUR] ) VAR _date = SELECTEDVALUE ( 'Raw'[DATE] ) RETURN CALCULATE ( SUM ( 'Fcast'[Value] ), FILTER ( 'Fcast', 'Fcast'[Date] = _date && 'Fcast'[Time] = _halfhour ), FILTER ( 'Raw', 'Raw'[DATE] = _date && 'Raw'[HALF HOUR] = _halfhour ) ) + 04. Create a table visual
Best Regards
- Anonymous3 years ago
Hi sam_rea_02 ,
I forgot to attach it, sorry for that. Please find it in the attachment.
Best Regards
Hi sam_rea_02 ,
I created a sample pbix file(see the attachment), please check if that is what you want.
1. Unpivot the date columns of query "Fcast"
2. Create a calculated table as below
Table = UNION(DISTINCT('Forecast'),SUMMARIZE('Raw','Raw'[HOUR],'Raw'[HALF HOUR],'Raw'[QUARTER HOUR],Raw[SKILL]))
3. Create a measure as below
Forecast =
VAR _halfhour =
SELECTEDVALUE ( 'Table'[HALF HOUR] )
VAR _date =
SELECTEDVALUE ( 'Raw'[DATE] )
RETURN
CALCULATE (
SUM ( 'Fcast'[Value] ),
FILTER ( 'Fcast', 'Fcast'[Date] = _date && 'Fcast'[Time] = _halfhour ),
FILTER ( 'Raw', 'Raw'[DATE] = _date && 'Raw'[HALF HOUR] = _halfhour )
) + 0
4. Create a table visual
Best Regards
Hi Anonymous ,
I havent seen the pbix? will it be possible to attached again. thanks
- Anonymous3 years agoNot applicable
Hi sam_rea_02 ,
I forgot to attach it, sorry for that. Please find it in the attachment.
Best Regards