The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
See below. Need custom column that shows the minimum count of the textColumn grouped by week.
weekNumber | textColumn | customColumn |
1 | A | 1 |
1 | B | 1 |
2 | A | 1 |
2 | B | 2 |
2 | B | 2 |
Solved! Go to Solution.
@Anonymous
Column = MINX(SUMMARIZE(ALL('Table'),[weekNumber],"__Count",COUNTROWS('Table'))
Hi @Anonymous ,
Please try below dax formula to add a new column:
customColumn =
VAR cur_weekNumber = 'Table'[weekNumber]
VAR cur_textColumn = 'Table'[textColumn]
VAR temp_table =
FILTER (
'Table',
'Table'[weekNumber] = cur_weekNumber
&& 'Table'[textColumn] = cur_textColumn
)
RETURN
COUNTROWS ( temp_table )
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please try below dax formula to add a new column:
customColumn =
VAR cur_weekNumber = 'Table'[weekNumber]
VAR cur_textColumn = 'Table'[textColumn]
VAR temp_table =
FILTER (
'Table',
'Table'[weekNumber] = cur_weekNumber
&& 'Table'[textColumn] = cur_textColumn
)
RETURN
COUNTROWS ( temp_table )
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous Thinking something like:
Measure = MINX(SUMMARIZE('Table',[weekNumber],"__Count",COUNTROWS('Table'))
@Anonymous
Column = MINX(SUMMARIZE(ALL('Table'),[weekNumber],"__Count",COUNTROWS('Table'))
User | Count |
---|---|
28 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |