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 August 31st. Request your voucher.

Reply
huzefa_53
Helper I
Helper I

Need to calculate frequency based on slicer value but need to assign frequency

Need to calculate frequency based on slicer value but need to assign frequency a label based on frequency range table 

 

huzefa_53_0-1652875191927.png

 

my frequency table has range but my frequency is calculated based pos check (check_module) pos check also has check_date which is connected with the calender date table 

 

I have created calculated columns for different module frequencies and assign the table index value based on frequency range given in table

 

The problem is that the frequency is calculated for all calender date but i have sliced filter which filter based on pos_check (check_date) i want that frequency should be based on that slicer date 

 

I have attached the file 

 

https://drive.google.com/file/d/1w9Kiu9UYrettR-IcK6TqyowG38w1-GmY/view?usp=sharing

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

10 REPLIES 10
huzefa_53
Helper I
Helper I

Hi @tamerj1  ,

 

You have created relationship of member_since_date with calender so it will bring those members whose frequecy lies in the table

 

what i want is that last frequency calculated in MM member engagment table should be dynamic based on filter as you can see that pos check and member is related using member_id and the way i am calculating frequency is count pos checks for every member for specific module and pos check is related with calendar on check date 

 

so the frequency should be dynamic based on date slicer and site slicer i taught by looking at glance that your solution was right but when in detailed i match the data it is not matching

tamerj1
Super User
Super User

Hi @huzefa_53 

Is this what you're looking for? https://we.tl/t-Rv7VOYPejx

The frequency number should be between slicer range and that frequency should be assign index according to the frequency index table

 

lets say i want frequency of december 2022 so my pos check table should give me 0 frequency because there is not check_module dining entries for any member

Hi @tamerj1  ,

 

You have created relationship of member_since_date with calender so it will bring those members whose frequecy lies in the table

 

what i want is that last frequency calculated in MM member engagment table should be dynamic based on filter as you can see that pos check and member is related using member_id and the way i am calculating frequency is count pos checks for every member for specific module and pos check is related with calendar on check date 

 

so the frequency should be dynamic based on date slicer and site slicer i taught by looking at glance that your solution was right but when in detailed i match the data it is not matching

CNENFRNL
Community Champion
Community Champion

I suggest you improving your data model first before authoring any measures. The quality of data model is of top priority.

 

  1. I don't see any point creating 'MM Member Engagement' table; you can directly apply all those calculated columns to 'MM Members';
  2. There's Referential Integrity Violation in the relationship between 'MM Member' and 'POS Check'; these values from 'POS Check'[member id] don't exist in 'MM Members'[member id]
    CNENFRNL_0-1652921710552.png

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

yes i got your point but what should i use in particular scenerio to calculate frequency of pos _check member based on check_module column and that frequency should be count using the particular frequency range table in order to get correct result 

 

for exampe 

 

never eat at club has frequency zero (now i want count within the slicer range number of member whose check_date is between slicer date and check module = dining and f&b pos  and frequecy with date is equal to zero )

 

similarly for other ranges as well given in dining freunency index table

amitchandak
Super User
Super User

@huzefa_53 , Are you looking for frequency column on meausre ?

Dynamic segmentation -Measure to Dimension conversion: https://youtu.be/gzY40NWJpWQ

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi the video you mention is segmentation on fix value what if i say i want to how what quantity a customer lies for a particular date range i can't achieve that , let say in october 2022 customer1 has purchase 5 time quantity of 5 item and overall he purchases 15 times 5 Qty  

yes i got your point but what should i use in particular scenerio to calculate frequency of pos _check member based on check_module column and that frequency should be count using the particular frequency range table in order to get correct result 

 

for exampe 

 

never eat at club has frequency zero (now i want count within the slicer range number of member whose check_date is between slicer date and check module = dining and f&b pos  and frequecy with date is equal to zero )

 

similarly for other ranges as well given in dining freunency index table

 

I have tried both ways column and measure as well i am not getting this that if i create column frequency how it will work between date range slicer

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.