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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
gabriellifinck
New Member

Calculate doesn't work with my filter

I have a mesuare thar calculate a value basead in some rules, and it will return my total basead in another rules. The point is when I put my measure in a table, the filters thar I apply doens't work, and the mesuare filters the lines. I want that my measure can be filter by external filter. 

 

Example:

My table without the measure:

-The filter 'stage' is working well. 

gabriellifinck_0-1712858647875.png


My table WITH de measure:

-The mesuare filter the initiatives that have some return

gabriellifinck_1-1712858719193.png



My measure:

gabriellifinck_2-1712858787544.png



In another measure, I try to put some return conditional in cases I don't have a result, but in that way, the table still don't considering my filters. 

Someone can helpme?? 

5 REPLIES 5
Greg_Deckler
Super User
Super User

@gabriellifinck Try ditching CALCULATE and go with SUMX(FILTER(...), ...)

Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

hello @Greg_Deckler 

It's my first post, sorry if I don't be clear. I serched some answered but I can't find. 
I expected that using my measure in the table, even tought I don't have a value, because my conditionals is blank, the measure don't filter my table, and the table showme all the results. 

In the firts picture, I see a lot of initiatives (first column). Example the initiative number 90074:

 

gabriellifinck_2-1712859950945.png


But in the second, with the measure, I can see no more. I think because the measurte don't return a value, it filters de table, and I can't see the initiative 90074.
And if I try to apply anothers filters, that doesn't work to.


What I expected for my measure:

ID_INITIATIVEESTAGIOMEASURE
1L2 
2L210
3L2-5


What I got applied the measure:

ID_INITIATIVEESTAGIOMEASURE
2L210
3L2-5

@gabriellifinck The easiest way to troubleshoot this is if you can provide sample source data as text and  your measure formula as text or provide a sample PBIX file to download. This way the scenario can be recreated and tested locally and a solution developmed versus guessing.


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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hello @Greg_Deckler!!

 

Here a PBIX with examples that the problem I got. I leave two tables, one with what I want, and another to show how the beahavior of the filters with the measure. 

 

PBIX TO DOWNLOAD 

 

 

gabriellifinck_0-1712864429950.png

 

I really thank you!

 

Hello @Greg_Deckler

Was it possible to make an analysis of my issue? Any ideas on how to solve it?

Thank you very much!!!

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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