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.
Im really struggling with a bit of DAX at the moment
I want to see them all. As an Addition I have a Filter on this visual containing a flag for Previous year against the date table
I tried this DAX
Solved! Go to Solution.
SORTED
@DebbieE ,Can you share sample data and sample output in table format?
Unfortunately not. Its a customers report
@DebbieE , are you trying % of total and it should remain the same even if you apply filter.
what is the intention of this formula and where it fails functionally?
I thought I had included all this in my initial post?
I want the percentage to still be % of total and it should remain the same even if you apply filter WITH the previous month flag
Hi @DebbieE,
It is a little difficult to locate the problem based on the current information. In order to investigate the cause of the problem, could you please provide some simulated data and your expected result? In addition, does the data involved in the report visuals come from a single table or multiple tables? If they come from multiple tables, whether some relationships be created between them? What is the granularity and direction? And the flag "Previous Month" is table field or measure?
Best Regards
Rena
Its going to take me a lot of time to get a blank example
However your questions
Hi @DebbieE ,
Please try to update the formula of measure "% by month (against All )" as below and check if it can get the correct value:
% by month (against All ) =
[Number]
/ CALCULATE (
[Number],
FILTER ( ALL ( DimTable ), 'DimTable'[Previous Month] = "True" )
)
Best Regards
Rena
its not worked
% by month (against All ) = [Number] / CALCULATE ( [Number], FILTER ( ALL ( DimTable ), 'DimTable'[Previous Month] = "True" ) )
the Previous Month Flag is in the Date table
My Slicer is in the DimTable
Change the reference from "true" to TRUE(). Looks like your column has Boolean datatype.
/ J
of course, Its boolean so thank you I reset that
Now I get this
this is the new measure that was suggested and it shows 100% against every implicit filter
This is because this filter is now now in the DAX only date is so I didnt think it would work.
can I amend to include both? the Slicer and the Current DaTE FLAG
SORTED
Try this,
% by month (against All ) =
[Number]
/ CALCULATE (
[Number],
ALL ( DimTable ),
'Date'[Previous Month] = "True" )
)
For some reason the ALL() Statement is cancelling out the filter on the Date table. Let me know if this works.
/ J
Do you have a relationship with crossfilter direction "both" between the date table and the main table?
Br,
J
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 |