Forum Discussion

LeroyPaul's avatar
LeroyPaul
Icon for Helper I rankHelper I
2 years ago

Measures that do not filter each other graphically

Hello ! ðŸ™‚

 

I have a problem with 2 measures in Power BI.

 

Context : 
My dashboard should respond to the following case:
I want to study the flow of documents to be processed over a given period.
For this, I have a table with a document for each row. Each document has a creation date and a processing date.
To study the documents to be processed over a given period, I've created a Calendar = CALENDARAUTO() table, which I use in a slicer.
Then, for a selected period, I filter my data table with the number of documents to be processed before this period and those to be processed at the end of this period.

 

Problem : 

In the problem I encounter, I study the number of documents processed over the period with this measure :

CloseDoc = CALCULATE(COUNT(Feuil1[Tag Doc]),FILTER(Feuil1,Feuil1[CreationDate]<=[Max Calendar]&&Feuil1[LasModification Date]>=[Min Calendar]))
 
Min Calendar & Max Calendar represent the limits of my period

 

I analyze this number with graphs on various dimensions.

In my example, I look at the locations of the documents to be processed.
Then I create a measure to determine whether the document to be processed is delayed or on-time.

The measure is as follows: 

Close Delayed = CALCULATE(COUNT(Feuil1[Tag Doc]),FILTER(Feuil1,[LasModification Date]>'Feuil1'[Danger Date Zone]),FILTER(Feuil1,Feuil1[CreationDate]<=[Max Calendar]&&Feuil1[LasModification Date]>=[Min Calendar]))

 

The results of these measures are both good


However, the dynamism of my graphs is not.
When I click in my graph of processed documents with a legend by location, my graph studying on-time and delayed cases is also filtered.


However, when I click on an element in my graph concerning document processing times, my first location graph is not filtered.

 

However, when I click on one of the elements of a visualization table, the 2 graphs are filtered.

 

 

I think I need to adapt my measures but I don't know how. I understood that I should probably use the treatas function but I've never used it. Can you help me?

Thanks in advance !

 

1 Reply