Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
mchacon
Advocate I
Advocate I

KPIs by text (Process status) DAX

KPIs by text (Process status) DAX function

 

Excel file with at least two columns: Document (text), and Status: with two text "Past due" and "On time".

Archivo Excel con al menos 2 columnas, Documento (texto) y Estado con dos textos "Vencido" y "En Tiempo"

 

Quantity = COUNTA(Name[Document])

Cantidad = COUNTA(Nombre[Documento])

-- Count as many document text, example "name of process".

 
Quant. Past due = CALCULATE([Quantity],Name[Status]="Past due")
Cant. Vencido = CALCULATE([Cantidad],Nombre[Estado]="Vencido")
-- Calculate Quantity text as many "Past due" Status
 
Quant. En tiempo = CALCULATE([Quantity],Name[Status]="On time")
Cant. En Tiempo = CALCULATE([Cantidad],Nombre[Estado]="En Tiempo")
-- Calculate Quantity text as many "On time" Status
 
Extra DAX 
 

Past due = CONTAINS(Name,Name[Status],"Past due")

Vencido = CONTAINS(nombre,nombre[Estado],"Vencido")

-- Database with Status as a column with text "Past due"

 

On time = CONTAINS(Name,Name[Status],"On time")

En Tiempo = CONTAINS(Nombre,Nombre[Estado],"En Tiempo")
-- Database with Status as a column with text "On time"
1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @mchacon ,

I created a sample pbix file(see the attachment), please check if that is what you want. You can create a slicer using the field [status] and create a measure as below to get it:

Quantity = COUNT('Table'[Document])

yingyinr_0-1676340729057.png

If the above one can't help you, please provide some raw data in your table (exclude sensitive data) with Text format, your visual Fields settings and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yiruan-msft
Community Support
Community Support

Hi  @mchacon ,

Whether your problem has been resolved? If yes, could you please mark the helpful post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yiruan-msft
Community Support
Community Support

Hi @mchacon ,

I created a sample pbix file(see the attachment), please check if that is what you want. You can create a slicer using the field [status] and create a measure as below to get it:

Quantity = COUNT('Table'[Document])

yingyinr_0-1676340729057.png

If the above one can't help you, please provide some raw data in your table (exclude sensitive data) with Text format, your visual Fields settings and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi, yingyinr the idea is Tips and Tricks, instead of getting help due to any problem, but thanks a lot.

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.