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.
Hi,
I am quite new to DAX and I am facing my first major issue.
I have a big table in my Power BI dashboard where each column is a calculated measure that uses a selected "year N" value given from a slicer. So each measure formula contains this filter : FILTER(Projeco, Projeco[Année] = SELECTEDVALUE(AllYears[Année]).
The measure that gives me trouble concerns the "Decalage" value for "year N". For one row, I need to make a DISTINCT because the Decalage is given for a total year, but each row of my initial database corresponds to a dayly entry.
Here is my calculated measure :
Hi,
I don't think I need to change the FILTER linked to the "year" slicer, I think the trouble resides in the SUMX used after the DISTINCT.
I also tried using VALUES instead of DISTINCT, with no success.
Hi @mvallee
You may try a measure like
Measure Total = IF(HASONEVALUE(Projeco[Décalage]), [Measure1], SUMX(VALUES(Projeco[Décalage]), [Measure1]))
If you are using a slicer to select a year value, you don't need to add FILTER(Projeco, Projeco[Année] = SELECTEDVALUE(AllYears[Année]) to the measures. It is because the filter will be applied to the measures automatically when you select a value in the slicer.
If this doesn't solve your problem, can you share some dummy data and expected result which can help us understand your requirement better? We'd like to know what is the wrong result currently and what should be the correct result more clearly. Thank you.
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.
@mvallee Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
can you try like
Décalage en N =
CALCULATE(
SUMX(values(Projeco[Décalage]), Projeco[Décalage]), FILTER(Projeco, Projeco[Année] in allselected(AllYears[Année]))
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |