Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi everyone,
I'm contacting you because I have an issue with this measure:
VAR MaxDate=max('dim Fecha'[Fecha])
RETURN
CALCULATE(
CALCULATE([*Tratamientos Activos],
'fact Visitas'[Id Tipo Visita]<>"I",
filter('fact Prescripciones',[*Cumple_No_Cumple]="Cumple"),
'fact Visitas'[Dias entre visitas (Atributo)]<>0),
filter(ALL('dim Fecha'),'dim Fecha'[Fecha]<=MaxDate),
filter(ALLSELECTED('fact Prescripciones'),'a Measures ET'[*Tratamientos Activos]=1))
hi @Greg_Deckler !
It's a pitty but those links didn't help me. I'll be glad to try to explain it again:
We have this measure:
*PRUEBA ADH =
VAR MaxDate=max('dim Fecha'[Fecha])
RETURN
CALCULATE(
CALCULATE([*Tratamientos Activos],
'fact Visitas'[Id Tipo Visita]<>"I",
filter('fact Prescripciones',[*Cumple_No_Cumple]="Cumple"),
'fact Visitas'[Dias entre visitas (Atributo)]<>0),
filter(ALL('dim Fecha'),'dim Fecha'[Fecha]<=MaxDate),
filter(ALLSELECTED('fact Prescripciones'),'a Measures ET'[*Tratamientos Activos]=1))
@okusai3000 It's perfectly clear but see the second part of the post. Need sample data and expected output to recreate it, otherwise it is next to impossible to help you out.
@okusai3000 This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
If that doesn't help, 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.
User | Count |
---|---|
116 | |
73 | |
62 | |
49 | |
47 |
User | Count |
---|---|
173 | |
123 | |
60 | |
59 | |
57 |