Forum Discussion
Barchart with constant line
- Anonymous4 years ago
HI tvilla,
#1, You can refer to the following blog to create relationships based on multiple table fields. (create a calculated column with year, month part from the date field and concatenate with id, then extract them to create a bridge table with unique value to mapping two table records)
Relationship in Power BI with Multiple Columns - RADACAD
How to Join Many to Many with a Bridge Table in Power BI | Seer Interactive
#2, I'd like to suggest you create a measure formula to summary value based on current groups and use it as the constant line:
measure = VAR selected = MAX ( Table1[Date] ) RETURN CALCULATE ( SUM ( Table2[Value2] ), FILTER ( ALLSELECTED ( Table2 ), YEAR ( [Date] ) = YEAR ( selected ) && MONTH ( [Date] ) = MONTH ( selected ) ), VALUES ( Table1[ID] ) )#3, You can try to do 'unpivot column' on type fields to send them to attribute and value, then you can simply use one filter to filter across multiple table fields.
Unpivot columns - Power Query | Microsoft Docs
Regards,
Xiaoxin Sheng
HI tvilla,
#1, You can refer to the following blog to create relationships based on multiple table fields. (create a calculated column with year, month part from the date field and concatenate with id, then extract them to create a bridge table with unique value to mapping two table records)
Relationship in Power BI with Multiple Columns - RADACAD
How to Join Many to Many with a Bridge Table in Power BI | Seer Interactive
#2, I'd like to suggest you create a measure formula to summary value based on current groups and use it as the constant line:
measure =
VAR selected =
MAX ( Table1[Date] )
RETURN
CALCULATE (
SUM ( Table2[Value2] ),
FILTER (
ALLSELECTED ( Table2 ),
YEAR ( [Date] ) = YEAR ( selected )
&& MONTH ( [Date] ) = MONTH ( selected )
),
VALUES ( Table1[ID] )
)
#3, You can try to do 'unpivot column' on type fields to send them to attribute and value, then you can simply use one filter to filter across multiple table fields.
Unpivot columns - Power Query | Microsoft Docs
Regards,
Xiaoxin Sheng