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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Ale_los
Regular Visitor

How to add second column with previous month measure created on SSAS

Hello everybody,

 

I’m having the following challenge.

Currently we have SSAS hosting our BI Datamart cube. From there we create all our measures that then we use on Power BI.

I have to create a report that shows several measures for the selected month as well as for the previous month. I have created the measures for previous month using the PARALLELPERIOD function and they are working fine. The challenge is visualizing this data on the same table or matrix in Power BI, I don’t know how to do that.

 

The result should be like this:

 

 

Measures

Current Month Selected

Previous Month

Count Customers

23

20

Count Accounts

34

30

Count Products

4

3

 

The users for this report are restricted to select just one month, not multiples.

I really really appreciate if someone can give me a clue!!

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @Ale_los ,

 

Could you please try to use DATEADD function to work on it such as:

 

prem = calculate([sum]; DATEADD( Dates[Date]; -1 ; Month )

If it doesn't meet your requirement, kindly share your sample data to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hello ,

 

Thank you for your answer and sorry for my late respond. I was off a couple of weeks.

 

The way I solved it was creating a measure using the DAX function SWITCH on the SSAS side. I used SWITCH to calculate a measure for CM, PM and PY. Then on the PowerBI side I used a Matrix, where each column represent CM, PM and PY.

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors
Top Kudoed Authors