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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

measure to devide data with 100% all situations

Hello guys
I'm creating a measure to generate an S-curve of predicted and realized as a percentage of existing values.

It turns out that when filtering the entire dataset from one filter, for example, territory, it divides the value between north and south, with south, being 75% and north 25% and the total percentage value of the entire set is 100%.

I need that when filtering the South set, it brings 100% and the North 100%, since it is only that territory.

The measurements I'm using are:

Tarefas Media =
DIVIDE(
    CALCULATE(COUNTROWS(Extrato_SDI),ALLSELECTED(Extrato_SDI)),
    CALCULATE(COUNTROWS(Extrato_SDI),ALL(Extrato_SDI)),0)

 

Tarefas Provisionadas Total pev =
CALCULATE([Tarefas Media],FILTER(ALLSELECTED(Extrato_SDI),Extrato_SDI[Prazo Conclusão Tarefa] <= MAX(Calendario[Data])))

Tarefas Realizadas Acomuladas per =
var vRA =    CALCULATE( [Tarefas Media],FILTER(ALLSELECTED('Extrato_SDI'),Extrato_SDI[Data Efetiva de Conclusão Tarefa] <= MAX('Calendario'[Data]) && 'Extrato_SDI'[Status Tarefa Id] = 3))
RETURN
IF(MAX(Calendario[Data]) >TODAY(),BLANK(),vRA)

How do you create a way to filter the values and always bring the part, like 100%, and the whole, like 100%?

2 REPLIES 2
Anonymous
Not applicable

@some_bih 
I Attachment a figure to show us about this.
Filter Norte

leandro41_1-1720026543472.png


Filter SUL

leandro41_2-1720026627861.png

All measure in dashboard

leandro41_3-1720026670158.png

 

My intention is that in a predicted measurement, I can filter the north and south, and, if there is no filter, the total value will appear. And activating the other filters in the report as well

 

some_bih
Super User
Super User

Hi @Anonymous your first measure  definition,[Tarefas Media],  include DAX function ALLSELECTED, [Tarefas Media].

This is ok if you use that measure for visuals.

Still, in your case this measure is used in another measures which is not good practice as results are almost impossible to figure out what are they.

Best practice for ALLSELECTED: use it for visuals not as input for other measures.

 

Rewrite code/s or provide simple file with input and expected output to provide possible solutions. Your request seems regular 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






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.