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

Put Parameter into New Column

I am using New Column to get the summarize data. Then , I would like to  filter the data shown on the summarize with the month that I want to input my self. Does anyone know how I could do that? 

natnatt_0-1595989273429.png

I would like to replace the Monthly[Monthly Value] with the number of month that the user input by themself. Therefore, I think parameter would be great, but after I make the parameter, it won't show up on the DAX to replace the Monthly[Monthly Value]

 

Your help would be really great! Thank you

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

If Monthly[Monthly value] is a date type value, like 2019/2/3,

you could create a date table without any relationship among other tables,

then create a measure like

Measure 2 = COUNTX(FILTER(Sheet4,Sheet4[monthname]=FORMAT(SELECTEDVALUE('date'[Date]),"MMM")),[bike id])

Capture17.JPG

If Monthly[Monthly value] is a number type value like 1,2,,,ect

You could create a what-if parameter and create a measure

Capture18.JPGCapture19.JPG

Measure 3 = COUNTX(FILTER(Sheet4,Sheet4[monthname]=FORMAT(DATE(2020,[Parameter Value],1),"MMM")),[bike id])

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

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

If Monthly[Monthly value] is a date type value, like 2019/2/3,

you could create a date table without any relationship among other tables,

then create a measure like

Measure 2 = COUNTX(FILTER(Sheet4,Sheet4[monthname]=FORMAT(SELECTEDVALUE('date'[Date]),"MMM")),[bike id])

Capture17.JPG

If Monthly[Monthly value] is a number type value like 1,2,,,ect

You could create a what-if parameter and create a measure

Capture18.JPGCapture19.JPG

Measure 3 = COUNTX(FILTER(Sheet4,Sheet4[monthname]=FORMAT(DATE(2020,[Parameter Value],1),"MMM")),[bike id])

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

amitchandak
Super User
Super User

@Anonymous , Not very clear. Can you share sample data and sample output in table format?

 

Like if selected month in a slicer. You can month data like

measure1 =
var _min = minX(allselected(Date,Date[Date]))
var _max = manX(allselected(Date,Date[Date]))
return
calculate(sum(Table[Sales]), filter(Table,Table[Date]>=_min && Table[Date]<=_max))

 

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))

 

refer:https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e

 

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.