Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Monthly Restriction

Hi Community,

 

I am pretty new to dax and your help will be appreciated.

 

I have created some power bi repots. now if a customer is monthly customer he can see the data only on the last day of month. for example if a customer is monthly customer when he logged in 1st of march he can able to see only until febrauary data not for march 1st. if he logged in 10th of march also he can able to see only until febrauary data.

 

I have no clue how to do it. 

 

thanks in advance!

 

Thanks,

Paruchuri

 

5 REPLIES 5
v-yuezhe-msft
Employee
Employee

@Anonymous,

What data would the user view if he logs in the date that is greater than 10th of March? In Power BI, you can compare today with the date you want and then display relevant data.

Please share dummy data of your table and post expected result here.


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Lydia,

 

Thanks for your reply. 

If i don't have montly restriction, If the user logs in he can view entire data until today but i want to restrict him to see only till last day of previous month.

 

Thanks,

Paruchuri.

@Anonymous,

Do you have other policies for other users? Or do you create the report for this specific user?

If the report is used by different user, you need to define Row Level security. If you create the report for the specific user, you can create measure.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Yes, I have created Dynamic Row Level Security. 

@Anonymous,

What is the problem do you get currently? You can create a measure using username() function to check if it returns specific user.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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