Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
hi, I have a column called 'Number of cards required'. I want to do a data quality check to see if there is any data for this columns where the value is actually a text instead of a number ? I just want to get the count of records where the value for this field is text.
can anyone please give me that DAX Query ? Thanks
Solved! Go to Solution.
Hi, @Anonymous ;
I'm not sure if I really understand what you mean, Base on my understand,I think you could use 2 method as follows:
Mothed 1:
a) add custom column in power query
Text.Select([Number of cards required],{"1".."9"})
b)create a measure
count1 = CALCULATE(COUNT([Number of cards required]),FILTER('Table',[Custom]=BLANK() ))
Method 2:
a) create a new measure
Measure = CONTAINSSTRING(MAX([Number of cards required]),"1")||CONTAINSSTRING(MAX([Number of cards required]),"2")|| CONTAINSSTRING(MAX([Number of cards required]),"3")||CONTAINSSTRING(MAX([Number of cards required]),"4")||CONTAINSSTRING(MAX([Number of cards required]),"7")||CONTAINSSTRING(MAX([Number of cards required]),"5")|| CONTAINSSTRING(MAX([Number of cards required]),"6")||CONTAINSSTRING(MAX([Number of cards required]),"8")||CONTAINSSTRING(MAX([Number of cards required]),"9")
b)create a measure
count2 = CALCULATE(COUNT([Number of cards required]),FILTER('Table',[Measure]=FALSE()))
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous ;
I'm not sure if I really understand what you mean, Base on my understand,I think you could use 2 method as follows:
Mothed 1:
a) add custom column in power query
Text.Select([Number of cards required],{"1".."9"})
b)create a measure
count1 = CALCULATE(COUNT([Number of cards required]),FILTER('Table',[Custom]=BLANK() ))
Method 2:
a) create a new measure
Measure = CONTAINSSTRING(MAX([Number of cards required]),"1")||CONTAINSSTRING(MAX([Number of cards required]),"2")|| CONTAINSSTRING(MAX([Number of cards required]),"3")||CONTAINSSTRING(MAX([Number of cards required]),"4")||CONTAINSSTRING(MAX([Number of cards required]),"7")||CONTAINSSTRING(MAX([Number of cards required]),"5")|| CONTAINSSTRING(MAX([Number of cards required]),"6")||CONTAINSSTRING(MAX([Number of cards required]),"8")||CONTAINSSTRING(MAX([Number of cards required]),"9")
b)create a measure
count2 = CALCULATE(COUNT([Number of cards required]),FILTER('Table',[Measure]=FALSE()))
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 43 | |
| 43 | |
| 38 | |
| 18 | |
| 15 |
| User | Count |
|---|---|
| 67 | |
| 63 | |
| 30 | |
| 30 | |
| 23 |