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.
Hi,
I have two tables :
- table A contains ID for each family, ID for each person, and birthdates
- table B contains ID for each family
The two tables have a many (table A) to one (table B) relationship based on ID for each family
I need to create a column in table B with the number of persons by family, so I created :
Hi @AFra ,
The connection is not working properly can you please share the link again.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @AFra ,
Try adding the following columns in dax:
NBR_OCCUPANTS =
var nombre = CALCULATE(COUNTROWS(TABLEA))
Return
if(nombre < 9, CONCATENATE(nombre, " pers."), "9 et +")
NBR_OCCUPANTS_enfant =
var nombre = CALCULATE(
COUNTROWS(
FILTER(ADDCOLUMNS(TABLEA,"Age", DATEDIFF(TABLEA[DATE_DE_NAISSANCE], TODAY(), YEAR)), [Age] <18)
)
) + 0
Return
if(nombre < 9, CONCATENATE(nombre, " enfants"), "9 et +")
No error for circularity will be returned.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português