CountRows in a table
dear all,
i newbie on power bi , facing trivial problem. have created following table enlisted type of fault , related number of calls. insert in table simple incremental index instance first row 1 second 2 , on (look snap data model , table). incremental index can allow me filter top 5 values in table. used rankx problem same value give me tie same number. i.e 2nd , 3rd rows have both rank 2.
i have 2 tables
query1 fields: callref, calltype, cause1, completiondate measures: faultcount , ranx1
lu_cause_code_description fields: cause_code (key), description
relationship lu_cause_code->query1 1ton cross filter direction: "both"
table:
description|faultcount|rankx
rail 8 1
assy 1 2
other 1 2
it seems easy issue reasons not it.
the formula used :
faultcount = countrows( distinct(query1[call_ref] ) )
ranx1 = rankx(filter(all(lu_cause_codes[description]),[faultcount]),[faultcount],,desc,dense)
please help
best regards
luca
the easiest way create index in power bi use built functionality transform data when import it.
you need go edit queries , select table want add index.
once table selected, go add column tab , ribbon see add index column.
this gives option start index 0, 1, or custom value.
make sure sort table before adding index because start first row in view , increment last in order.
with few minor ui differences, works same in excel using power query add-in too.
SQL Server > Power Pivot
Comments
Post a Comment