Forum Discussion
write DAX
hi Friends
i have two tables
1st table i have only one lineitem it contains
siteURL column : https://eu028-sp.hll.com/sites/CPOAA1089/ooty
download URL column : /_layouts/download.aspx?SourceUrl=
2nd table i have mutiple line items in that i have column called attachments column : /BRDocs/50_img_H_BR_Creation.png;
1st coniditon : siteURL column + download URL column + siteURL column + attachments column. it has to show
"https://eu028-sp.hll.com/sites/CPOAA1089/ooty/_layouts/download.aspx?SourceUrl=SourceUrl=https://eu028-sp.hll.com/sites/CPOAA1089/ooty/BR Docs/50_img_H_BR_Creation.png;
2nd condition : in attachments column if i have multiple columns show
Attachments
/BR Docs/50_img_H_BR_Creation.png;
/BR Docs/50_img_H_BR_Creation.png;
/BR Docs/50_img_H_BR_Creation.png;
/BR Docs/50_img_H_BR_Creation.png;
NewColumn
"https://eu028-sp.hll.com/sites/CPOAA1089/ooty/_layouts/download.aspx?SourceUrl=SourceUrl=https://eu028-sp.hll.com/sites/CPOAA1089/ooty/BR Docs/50_img_H_BR_Creation.png;
"https://eu028-sp.hll.com/sites/CPOAA1089/ooty/_layouts/download.aspx?SourceUrl=SourceUrl=https://eu028-sp.hll.com/sites/CPOAA1089/ooty/BR Docs/50_img_H_BR_Creation.png;
"https://eu028-sp.hll.com/sites/CPOAA1089/ooty/_layouts/download.aspx?SourceUrl=SourceUrl=https://eu028-sp.hll.com/sites/CPOAA1089/ooty/BR Docs/50_img_H_BR_Creation.png;
"https://eu028-sp.hll.com/sites/CPOAA1089/ooty/_layouts/download.aspx?SourceUrl=SourceUrl=https://eu028-sp.hll.com/sites/CPOAA1089/ooty/BR Docs/50_img_H_BR_Creation.png;
Note : if attchemnt is empty no need show any data . if it is not empty add that url
Note :please kindly share powerbi file
Regards
Yukta
Hello Anonymous,
Can you please try this approach:
NewColumn = VAR SiteURL = FIRSTNONBLANK( Table1[siteURL], Table1[siteURL] ) VAR DownloadURL = FIRSTNONBLANK( Table1[download URL], Table1[download URL] ) RETURN IF( ISBLANK( Table2[attachments] ) || Table2[attachments] = "", BLANK(), SiteURL & DownloadURL & "SourceUrl=" & SiteURL & Table2[attachments] )
2 Replies
- Sahir_MaharajSuper User
Hello Anonymous,
Can you please try this approach:
NewColumn = VAR SiteURL = FIRSTNONBLANK( Table1[siteURL], Table1[siteURL] ) VAR DownloadURL = FIRSTNONBLANK( Table1[download URL], Table1[download URL] ) RETURN IF( ISBLANK( Table2[attachments] ) || Table2[attachments] = "", BLANK(), SiteURL & DownloadURL & "SourceUrl=" & SiteURL & Table2[attachments] )- AnonymousNot applicable
but it was creating duplicate id's.