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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
RajK2
Helper II
Helper II

Calendar all the month Using DAX

Dear Team,

 

I've Fact table which have data like

Apple have 12 months data

Orange have 3 months data

Banana have 4 months data

 

if i filter fact table for orange it will show 12 months period instead of 3 months where we don't have data then also it will show on particular month as zero. My table view should be fixed as 12 months.

 

what is DAX Formula ?

 

Orange                     Apple

Capture7.PNGCapture8.PNG

4 REPLIES 4
bhanu_gautam
Super User
Super User

Are you creating measure or column, create column instead of measure




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Hi,

I've shared the sample data as ideally have 20+ columns of data.

 

columns

Month, Type, Value, Qty, GG Value, TR Value, KN Value etc....

 

Measure field as SUM Of 'ADJ Value' and we need to 12 months report view incase no data on particular months.

 

Capture10.PNG

 

 

 

bhanu_gautam
Super User
Super User

@RajK2 , You can create new column for this using formula

 

FixedTable = 
ADDCOLUMNS(
   SUMMARIZE('FactTable', 'FactTable'[Fruit]),
   "Month", IF(COUNTROWS('FactTable') > 0, 'FactTable'[Month], BLANK()),
   "Value", IF(COUNTROWS('FactTable') > 0, 'FactTable'[Value], 0)
)

 and use this table in visualization 




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Dear Bhanu,

 

Thanks for response.

Value is calculated using measure however this may not works so end up with error

Measure created like Adj Value = Amount / Qty

 

Capture9.PNG

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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