Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
Hi
I am able to create this Table Visualisation in Power BI by dragging in columns from different tables and applying the appropriate filters in the Filters Pane on this specific Visual. The filters are obvious as per the table values but the only strange condition is Written Amount > 0. This results in 15x unique Product Numbers as per the table. I need a measure that can calculate the row count of the table below that equals 15 unique Product Numbers based on the filter conditions applied.
The columns listed in the Table Visualisation are in the following tables in the database and there are active relationships (direct and indirect relationships - through other tables not listed) between these tables in the model:
1. Database Table A contains the following columns:
- Product Number
- Product Line
- Product Type
- Product Sub-Type
- Status
- Origin
2. Database Table B contains the following column:
- Period
3. Database Table C contains the following column:
- Direct or Indirect
4. Database Table D contains the following column:
- Written Movement
Please assist. I can't share the data.
Solved! Go to Solution.
CALCULATE(COUNTROWS("correct_table"), Filter1, Filter2, etc) resolved this.
Was using the incorrect table thanks.
CALCULATE(COUNTROWS("correct_table"), Filter1, Filter2, etc) resolved this.
Was using the incorrect table thanks.
Hi @Leon12Smith usually measure for count number of rows for some of table is
Count rows=COUNTROWS ( table )
Adjust your table name
If you filter something and want to calculate "the rest" number of rows meaning non filtered rows you should use
Count rows rest =
VAR __rows_all=CALCULATE (
COUNTROWS ( table ),
ALL()
)
VAR __rows_allselected=CALCULATE (
COUNTROWS ( table ),
ALLSELECTED()
)
VAR __Result=__rows_all-__rows_allselected
RETURN __Result
Did I answer correctly?
Kudos appreciate / accept solution
Proud to be a Super User!
@some_bih, there is an additional condition "Written Amount > 0" mentioned.
Maybe something like this:
Rows =
CALCULATE(
COUNTROWS(yout_table),
Written Amount > 0
)
@Leon12Smith Just an extended idea to suggested solution from @some_bih
Regards
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!