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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
rakelvillanueva
New Member

help calculation

First of all, please excuse my lack of knowledge in making this inquiry.

I have two tables, one for open tickets and another for closed tickets, and a table of dates (calculate dates).

I have a display with averages of open and resolved tickets, but I want to calculate the number of tickets that are open on a given date. However, no matter how many formulas I try, it doesn't work.

 

Screenshot_1.png

 

 

 

 

I have tried several formulas, including this one, but it does not calculate correctly.

Prueba = VAR FechaSeleccionada = SELECTEDVALUE(Fechas[Date])
RETURN
CALCULATE(
COUNTROWS(TICKETS_ABIERTOS),
TICKETS_ABIERTOS[Apertura] <= FechaSeleccionada,
OR(
ISBLANK(TICKETS_ABIERTOS[Resolucion]),
TICKETS_ABIERTOS[Resolucion] >= FechaSeleccionada

)

I am also unable to generate a visual table that filters by the result of this measurement.

9 REPLIES 9
v-hjannapu
Community Support
Community Support

Hi @rakelvillanueva,

Thank you  for reaching out to the Microsoft fabric community forum.

I would also take a moment to thank @wardy912 , @techies, @Greg_Deckler for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.

See if your Date table is marked as a Date Table and linked properly to the ticket table using the Opened Date and If the  closed / resolution Date is in another table, make sure both tables are related correctly so the formula can read both dates.

First test the formula without any slicers or extra filters. If it gives correct results, then try adding your group slicer.

If it still doesn’t work with the group slicer, the formula may need a small change so it keeps that filter active.

Hope this helps if you have any queries we are  happy to assist you further.
Best Regards,
Harshitha.

wardy912
Impactful Individual
Impactful Individual

Hi @rakelvillanueva 

 

 Ticket backlog was a pain for me to.

Here's the DAX I used (Obviously, add your tables and columns):

 

Incident Backlog = 
VAR CurrentDate = MAX('Date'[Date])
VAR ActiveTickets =
CALCULATE(DISTINCTCOUNT(Incidents[Number]),
ALL('Date'),
'Date'[Date]<=CurrentDate,
ISBLANK(Incidents[Resolved Date])
||Incidents[Resolved Date]>=CurrentDate)
Return
ActiveTickets

 

I hope this helps!

I have tried that solution several times and it has not worked for me.

Can you show me your version please?

If you've swapped out the tables/columns for yours there shouldn't be an issue. Do you have an active relationship between your date table and opened date?

techies
Super User
Super User

Hi @rakelvillanueva please try this

 

Tickets Open on Date =
VAR FechaSeleccionada =
    SELECTEDVALUE('date'[Date])
RETURN
CALCULATE(
    COUNTROWS(Merge1),
    FILTER(
        ALL(Merge1),  
        Merge1[Apertura] <= FechaSeleccionada &&
        (
            ISBLANK(Merge1[TICKETS_CERRADOS.Resolucion]) ||
            Merge1[TICKETS_CERRADOS.Resolucion] > FechaSeleccionada
        )
    )
)
 
 
 
― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978

I have tried that solution several times and it has not worked for me.

Greg_Deckler
Community Champion
Community Champion

@rakelvillanueva Have a look at this, I created this specifically for the purpose you are describing:

Open Tickets - Microsoft Fabric Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

I'm testing this, but I would like to add a filter to the formula for a field I have for groups and a slicer so I can filter.

I'm testing this, but I would like to add a filter to the formula for a field I have for groups and a slicer so I can filter.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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