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
bolarinwa
Frequent Visitor

Calculated Column- Active Months in Use

Hi, I created a calculated column Mont h in use which calculates the number of Months from the service data for each location e.g column 1 is the first service Month and column 6 is 6 Months after. However, I want each next Month to be Months when the service is active, that is only when there are values. For example in row 1 values in months 14-19 should be in columns 6-12.

Below is my dax code 

Months in Use (Location) = FLOOR(DATEDIFF(RELATED(categories[First Feedback]), RELATED('Time'[Start Of Day]), DAY) / (365/12), 1) + 1
 
Please help.

 

 

 

 

bolarinwa_0-1620714089344.png

 

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @bolarinwa ,

 

The FLOOR function cannot be used in the calculated column and row level security in the direct connection mode. The RELATED function takes effect only if there is a relationship between the current table and the target table. The function follows the existing many-to-one relationship. Please check the connection method of the data source. First, eliminate the errors caused by the above function restrictions. If there are still problems, can you provide a test data model (delete sensitive information) and the expected results, I will answer you as soon as possible.


Let me know the result immediately, looking forward to your reply.

 

Best Regards,
Henry

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

bolarinwa
Frequent Visitor

@amitchandak @Greg_Deckler @parry2k  please can you help?

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.