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 Experts,
@Anonymous
I am using below DAX,
Curnt Mnth -1 Wk Weitg =
'People Flash Consolidated'[Period] = "MTD"
&& (
'People Flash Consolidated'[Month Rank]
= MAX ( 'People Flash Consolidated'[Month Rank] ) - 1
)
&& MAX ( 'People Flash Consolidated'[Weeknumber] )
i was expecting that, True will only show the Max of the week number, but its showing all the week number, see below, Can someone please help to tweak this Dax, so that in that when i filter for True, it shows only Max of the week number
Solved! Go to Solution.
Hi @vjnvinod
Download this sample PBIX file
Your code is working, it's your data that is returning False because there aren't any rows where all 3 of those conditions are True.
If you create a separate column for each of your conditions - as I've done in the sample PBIX file I linked to above - you'll see that when you filter MTD to show only True, then filter MAX_Month_Rank to show only True, the only value left in MAX_Weekenumber is False.
Therefore your data does not contain any rows where your 3 conditions are True.
Regards
Phil
Proud to be a Super User!
Hi @vjnvinod
Download this sample PBIX file
Your code is working, it's your data that is returning False because there aren't any rows where all 3 of those conditions are True.
If you create a separate column for each of your conditions - as I've done in the sample PBIX file I linked to above - you'll see that when you filter MTD to show only True, then filter MAX_Month_Rank to show only True, the only value left in MAX_Weekenumber is False.
Therefore your data does not contain any rows where your 3 conditions are True.
Regards
Phil
Proud to be a Super User!
I think i found why my code was not returning it correctly, there was issue with the code
below is how it should have been, but thank you so much for your help with this
Curnt Mnth -1 Wk Weitg =
'People Flash Consolidated'[Period] = "MTD"
&& (
'People Flash Consolidated'[Month Rank]
= MAX ( 'People Flash Consolidated'[Month Rank] ) - 1
)
&& 'People Flash Consolidated'[Weeknumber]
= 'People Flash Consolidated'[Currentweek]-1
Hi @vjnvinod
I'm not understanding what you are trying to do, can you please share your data/PBIX file.
Regards
Phil
Proud to be a Super User!
I am trying to create a filter calculated coloumn
that means if
People Flash Consolidated'[Period] = "MTD"and
People Flash Consolidated'[Month Rank] is previous month and
People Flash Consolidated'[Weeknumber] =current week,
for this output should be true, else false
The below Dax what i am using is helping me with first 2 condition but not the 3rd one
Its basically not reading the 3rd argument
People Flash Consolidated'[Period] = "MTD"
&& (
'People Flash Consolidated'[Month Rank]
= MAX ( 'People Flash Consolidated'[Month Rank] ) - 1
)
&& MAX ( 'People Flash Consolidated'[Weeknumber] )
Hi @vjnvinod
Your 3rd test condition isn't actually testing anything. Your just saying return MAX ( 'People Flash Consolidated'[Weeknumber] ).
You need to do something like
'People Flash Consolidated'[Weeknumber] = MAX ( 'People Flash Consolidated'[Weeknumber] )
Regards
Phil
Proud to be a Super User!
Output is coming as false, not sure why is it reading it that way?
i have attached the sample and filtered it, where i was expecting as output true
Highly appreciate any help on this
https://drive.google.com/file/d/1LimuMp8Dz90ej5Uo7wKxdldYC9n9kUfZ/view?usp=sharing
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 |
---|---|
114 | |
100 | |
78 | |
75 | |
49 |
User | Count |
---|---|
145 | |
108 | |
107 | |
89 | |
61 |