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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Sowmiya
Helper III
Helper III

DAX

Hi Community,
Please help me with DAX Requirement.

My raw data is,

YearMonth No.Value
201712%
201723%
201734%
201745%
201756%
201767%
201778%
201789%
2018110%
2018211%
2018312%
2018413%
2018514%
2018615%
2018716%
2018817%
2018918%
2019119%
2019220%
2019321%
2019422%
2019525%
2019626%


Required Output:
1. Year is added as filter,
 Ex: Year Filter added as Drop DownEx: Year Filter added as Drop Down
2. Line Visual showing 2017, 2018, 2019 and All

Ex: Line Visual (X-Axis is Month  No); (Value displayed in above visual is Average of Value)Ex: Line Visual (X-Axis is Month No); (Value displayed in above visual is Average of Value)
DAX Requirement:
Req 1. When 2017 is alone selected in Filter, the visual should display the value for 2017 alone. (Note: "All" field should not be displayed)
    When 2018 is alone selected in Filter, the visual should display the value for 2018 alone. (Note: "All" field should not  be displayed)
    When 2019 is alone selected in Filter, the visual should display the value for 2019alone. (Note: "All" field should not be displayed)

Req 2. When 2017 and 2018 is selected in Filter, visual should display value for 2017, 2018 and All (Note: "All" field is composed of 2017 and 2018).
When 2018 and 2019 is selected in Filter, visual should display value for 2018, 2019 and All (Note: "All" field  is composed of 2018 and 2019).
When 2019 and 2017 is selected in Filter, visual should display value for 2019, 2017 and All (Note: "All" field is composed of 2019 and 2017).

Req 3. When 2017, 2018 and 2019 are selected in Filter, visual should display value for 2017, 2018, 2019 and All (Note: "All" field is composed of 2017, 2018 and 2019).

Please assist me with DAX requiremnet. 

Thanks in Advance,
With regards,
Sowmiya

1 REPLY 1
Anonymous
Not applicable

Hi @Sowmiya,

 

I understand your requirement and Based on the raw data that you have provided, i suggest you go for the below steps,

 

1. Create a dimension with the distinct values of year from the Raw data. So,

      Table 1 : Your original Raw Data

      Table 2 : Dimension table with the column year (Distinct value)

2. Relate these two tables with the year column

3. Use year column from the dimension table as your report filter 

4. Average of value will be in the vaue field in the visual.

 

Click on the year filter and apply the properties whether you want to single select or multi select values.

Based on your selection, the visual should display the trend of it.

 

Hope this helps a lot and find the solution for your problem.

 

Regards,

Pradeep

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.