am having a CSV file with a column name MFileName with values
1500_MM_19876_USA_TEST_TRXE
1800_RR_12960_US1_TEST_TRAX
1501_MM_19876_US1_TEST_TRXE
1802_RR_12960_USA_TEST_TRAX
1501_MM_19876_US1_TEST_TRXE
1803_RR_12960_USA_TEST_TRAX
1804_RR_12960_US1_TEST_TRAX
so, my requirement is show in a slicer, that, the USA ==== 3 && US1 ==== 4
i loaded this csv file into powerbi desktop and wanting to create a report/slicer . Am stuck at what DAX query need to be applied in order to get : want to fetch 1) how many records exist having "USA" as substring 2) how many records exist having "US1" as substring
I tried with some DAX queryies but its failed.i created a new column from the power query editor and tried to wrote the query.
USAcountcoulmn=IF(FIND("USA",table1(MfILENAME),1,0) >=1,1,0)
now i tried with another query :
USACountctual = SEARCH("USA",Table1[MFILENAME],,0)
as a result it returns , 0 or 1 in the cell values. But , how can i get the total number of cells which is having a substring(text) "USA" present in the column "MFILENAME" ? in the slicer, i should get the value as 3 for "USA" and 4 for "US1"