Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Dear Friends,
i have table1(name,Bank) and contains multiple bank id(by line break(lf)) to indivdiual user as show in table:
i need to count total bank id, for example, total bank id=11, and for Name8=3 and so on.
i did by power query using split by row(lf) and its working fine
but how can i get by using DAX ??
thanks
Jia
Solved! Go to Solution.
Dear All
i solved myself the above problem, by:
len(bank id)-len(substitute(bank id,unichar(10),""))+1
Thanks
Dear All
i solved myself the above problem, by:
len(bank id)-len(substitute(bank id,unichar(10),""))+1
Thanks
Hi @Anonymous ,
If your ids in one name is splicated by delimiters that occupy one character like space, you can try this code to count the bank id.
My sample:
Measure:
Count Bank id =
VAR _ADDLEN = ADDCOLUMNS('Table',"Length",LEN('Table'[Bank id]))
VAR _ADDCOUNT = ADDCOLUMNS(_ADDLEN,"Count ID", VAR _MINLEN = 7 VAR _MOD = MOD([Length],_MINLEN) RETURN _MOD + 1)
RETURN
SUMX(_ADDCOUNT,[Count ID])
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Dear
i want to by direct Dax, not by Power Query because i have multiple data source and dont want to more complex
Here , total bank id is 11 because some name contains multiple bankd id by line break in bank id column.
We want to help.
The answer I provided is in DAX!
However, you will need an input table with populated columns on each row. You will need to do that in power query with fill.
Please share elexample input data as a table not a screen shot. So we can import the data and build a solution.
Also provide example desired output and description.
Dont share private data.
In power query use the Fill option to populate the Name on every row.
User | Count |
---|---|
88 | |
74 | |
69 | |
65 | |
58 |
User | Count |
---|---|
104 | |
94 | |
76 | |
62 | |
59 |