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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Stevianne
Frequent Visitor

crossfiltering on a higher level....

Hello PBI community,

 

I created below DAX formula for six different municipalities. A, B, C, D, E and XY in order to benchmark data.

 

XY =

VAR Gerealiseerd = CALCULATE( SUM( Zorggegevens[bedrag_goedgekeurd] ) ,Persoonsgegevens[Gemeente]= "XY" )
VAR Benchmark =
CALCULATE( SUM( Zorggegevens[bedrag_goedgekeurd]) ,
Persoonsgegevens[Gemeente] = "XY" ,
FILTER( ALL(Datumtabel) ,
Datumtabel[JaarKwartaal] = "2018Q1" )
)

RETURN

DIVIDE( Gerealiseerd - Benchmark , Benchmark)

 

When I add these six DAX formulas in a line chart I get below:

 

Stevianne_1-1638878206703.png

So far so good! However, When I add a slicer  Stevianne_2-1638878391146.png 

With informatino from "percelen" and "productcodes" to benchmark information between different municipalities. This information does not appear in the line chart. Because the municipalities (in dutch 'gemeente') has no relation with tables Percelen and productcodes.

 

 

Stevianne_3-1638878615939.png

 

What do I have to do so information about benchmarking will appear in the line chart.

6 REPLIES 6
PaulDBrown
Community Champion
Community Champion

Try:

XY =
VAR Gerealiseerd =
    CALCULATE (
        SUM ( Zorggegevens[bedrag_goedgekeurd] ),
        FILTER ( Persoonsgegevens, Persoonsgegevens[Gemeente] = "XY" )
    )
VAR Benchmark =
    CALCULATE (
        SUM ( Zorggegevens[bedrag_goedgekeurd] ),
        FILTER ( Persoonsgegevens, Persoonsgegevens[Gemeente] = "XY" ),
        FILTER ( ALL ( Datumtabel ), Datumtabel[JaarKwartaal] = "2018Q1" )
    )
RETURN
    DIVIDE ( Gerealiseerd - Benchmark, Benchmark )




Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Hi,

 

I did apply your DAX formula. Unfortunately when I filter on a specific 'perceel' No information appears in the line chart...

 

Stevianne_0-1638880766358.png

 

It's hard to see what's going on without sample data or PBIX file. Any chance you can share via a cloud service?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Yes I understand. Unfortunately I'am not allowed to share data because of privacy. Anyway I can explain in detail which steps I took or I make an duplicate of this model with different information.

 

What do you prefer?

If you could create a dummy PBIX file it would be most helpful!





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






I will do that. Takes me some time, hope this week!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.