Forum Discussion
tannhq
4 years agoHelper I
Count rows in table visual with Field Parameters
Hello everyone, I have a question. Before that, I can use the COUNTROWS and SUMMARIZECOLUMNS to caculate the number of rows visible in the visual table. But now we apply Field parameters, how can...
- 4 years ago
It's a two step process. Check the article at sqlbi.com . Fields parameters in Power BI - SQLBI
Unfortunately it is not (yet) possible to provide lists of columns instead of individual columns
lbendlin
3 years agoSuper User
Rowcount =
SWITCH(concatenatex(parameter,[Parameter],","),
"ACCOUNTING_PERIOD",COUNTROWS(SUMMARIZE(ALLSELECTED('ledger_fy22_qtr1'),[ACCOUNTING_PERIOD])),
"FISCAL_YEAR",COUNTROWS(SUMMARIZE(ALLSELECTED('ledger_fy22_qtr1'),[FISCAL_YEAR])),
COUNTROWS(SUMMARIZE(ALLSELECTED('ledger_fy22_qtr1'),[FISCAL_YEAR],[ACCOUNTING_PERIOD]))
)