Forum Discussion
Gerbil
Helper I
2 years agoCreating a Card that displays a count of aggregate data?
Reposting this with clearer table So I have a table like so: Region Name Flag Count of Job ID North John On 12 South Drake Off 11 South Jason On 5 We...
- 2 years agoTry this:rowcount =VAR table1 = CALCULATETABLE(SUMMARIZE('Table', 'Table'[Flag], 'Table'[Region], 'Table'[Name], "@rowcount", COUNTROWS('Table')), 'Table'[Flag] = "Off")RETURNCOALESCE(SUMX(table1, IF([@rowcount] > 10, 1, 0)), 0)///Mediocre Power BI Advice, but it's free///
Gerbil
Helper I
2 years agoSo the data coming in (from direct query) looks like this:
| Region | Name | Flag | Job ID |
| North | John | On | 16127 |
| North | John | On | 77647 |
| North | John | On | 41588 |
| North | John | On | 46424 |
| North | John | On | 24132 |
| North | John | On | 56180 |
| North | John | On | 57396 |
| North | John | On | 41324 |
| North | John | On | 8899 |
| North | John | On | 809 |
| North | John | On | 19558 |
| North | John | On | 91024 |
| North | John | On | 90642 |
| South | Drake | Off | 52577 |
| South | Drake | Off | 76784 |
| South | Drake | Off | 81416 |
| South | Drake | Off | 77264 |
| South | Drake | Off | 53032 |
| South | Drake | Off | 25992 |
| South | Drake | Off | 50560 |
| South | Drake | Off | 20368 |
| South | Drake | Off | 81093 |
| South | Drake | Off | 97126 |
| South | Drake | Off | 46680 |
| South | Drake | Off | 59402 |
| South | Jason | On | 93735 |
| South | Jason | On | 24804 |
| South | Jason | On | 8312 |
| South | Jason | On | 96618 |
| South | Jason | On | 5066 |
...etc
And the table created above has the column "Count of Job ID" through Power BI. "Count of Job ID" is not an actual column, it's more like a measure. It's an aggregate count of "Job ID". So I can't use the function you've provided since "Count of Job ID" is not a column in my table.
kpost
Solution Sage
2 years agoTry this:
rowcount =
VAR table1 = CALCULATETABLE(SUMMARIZE('Table', 'Table'[Flag], 'Table'[Region], 'Table'[Name], "@rowcount", COUNTROWS('Table')), 'Table'[Flag] = "Off")
RETURN
COALESCE(SUMX(table1, IF([@rowcount] > 10, 1, 0)), 0)
///Mediocre Power BI Advice, but it's free///
- Gerbil2 years ago
Helper I
That totally worked! Thank you so much!