The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have 3 tabels.
Table 1 contains a series of Policy numers
Table 2 Each Policy has 1 or more line items, which represent a coverage. They are represented by a TypeNr
Table 3. Each coverage (TypeNr) is either a saving of risc.
What I need, is a column is table 1, which shows if the policy only have items of the type Saving, Risc og Both. Any help will be greatly appreciated
Solved! Go to Solution.
Hi,
I am not sure how your datamodel looks like, but please check the below picture and the attached pbix file.
It is for creating a new table.
Expected result new table =
VAR _t =
SUMMARIZE ( Policy_Type, Policy[Policy], 'Type'[Type] )
VAR _condition =
ADDCOLUMNS (
_t,
"@Coverage",
IF (
COUNTROWS ( FILTER ( _t, Policy[Policy] = EARLIER ( Policy[Policy] ) ) ) > 1,
"Both",
'Type'[Type]
)
)
RETURN
SUMMARIZE ( _condition, Policy[Policy], [@Coverage] )
Hi,
I am not sure how your datamodel looks like, but please check the below picture and the attached pbix file.
It is for creating a new table.
Expected result new table =
VAR _t =
SUMMARIZE ( Policy_Type, Policy[Policy], 'Type'[Type] )
VAR _condition =
ADDCOLUMNS (
_t,
"@Coverage",
IF (
COUNTROWS ( FILTER ( _t, Policy[Policy] = EARLIER ( Policy[Policy] ) ) ) > 1,
"Both",
'Type'[Type]
)
)
RETURN
SUMMARIZE ( _condition, Policy[Policy], [@Coverage] )
Thank you - that was exactly what I needed
User | Count |
---|---|
77 | |
75 | |
36 | |
31 | |
29 |
User | Count |
---|---|
94 | |
80 | |
55 | |
48 | |
48 |