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 September 15. Request your voucher.
Hi all, I need solution for this condition attached in screenshot.
Theere is multiple same BD CODE when filtering V P.doc also has only one BD CODE. I need to take the distinct count of BD CODE and then I need to substract the distict count with the count that has only single row. Please refrer screenshot for more clarification.
Please help. Thanks.
Solved! Go to Solution.
Hey @_Junayetrahman ,
consider creating a pbix file that contains sample data, but still reflect your data model: tables, relationships, calculated columns and measures. Upload the pbix to onedrive, google drive, or dropbox and share the link. If you are using a spreadsheet to create the sample data instead of the manual input method share the spreadsheet as well.
Do not forget to describe the expected result based on the sample data you provide. Also add data visualizations to a report page and describe how you expect the result is "mapped" to the visual(s).
Regards,
Tom
Hi @_Junayetrahman ,
You can create a measure as below to get it, please find the details in the attachment.
Count of repeated DB Code =
VAR _tab =
SUMMARIZE (
'Table',
'Table'[BD CODE],
"@count",
CALCULATE (
DISTINCTCOUNT ( 'Table'[V Code] ),
FILTER ( 'Table', 'Table'[BD CODE] = EARLIER ( 'Table'[BD CODE] ) )
)
)
VAR _count =
SUMX ( _tab, [@count] )
RETURN
COUNTROWS ( FILTER ( _tab, [@count] > 1 ) )
Best Regards
Hi @_Junayetrahman ,
You can create a measure as below to get it, please find the details in the attachment.
Count of repeated DB Code =
VAR _tab =
SUMMARIZE (
'Table',
'Table'[BD CODE],
"@count",
CALCULATE (
DISTINCTCOUNT ( 'Table'[V Code] ),
FILTER ( 'Table', 'Table'[BD CODE] = EARLIER ( 'Table'[BD CODE] ) )
)
)
VAR _count =
SUMX ( _tab, [@count] )
RETURN
COUNTROWS ( FILTER ( _tab, [@count] > 1 ) )
Best Regards
Hey @_Junayetrahman ,
consider creating a pbix file that contains sample data, but still reflect your data model: tables, relationships, calculated columns and measures. Upload the pbix to onedrive, google drive, or dropbox and share the link. If you are using a spreadsheet to create the sample data instead of the manual input method share the spreadsheet as well.
Do not forget to describe the expected result based on the sample data you provide. Also add data visualizations to a report page and describe how you expect the result is "mapped" to the visual(s).
Regards,
Tom
User | Count |
---|---|
59 | |
57 | |
55 | |
50 | |
32 |
User | Count |
---|---|
171 | |
87 | |
70 | |
46 | |
45 |