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.
Hi ,
I have dataset like, want to calculate count where (Pass = "N")
Month | Year | pass |
Jan | 2019 | Y |
Jan | 2019 | Y |
Jan | 2019 | N |
Jan | 2019 | N |
Feb | 2019 | Y |
Feb | 2019 | N |
Feb | 2019 | Y |
Feb | 2019 | N |
Feb | 2019 | N |
Jan | 2020 | N |
Jan | 2020 | N |
Jan | 2020 | Y |
Feb | 2020 | N |
Feb | 2020 | N |
Mar | 2020 | N |
Mar | 2020 | Y |
Mar | 2020 | Y |
1. I want month wise current year (2021) and last year trend (2020) chart trend.
2.latest year in table (2020) and last to that table (2019) trend.
2 bar chart i need with type of requirement.
DAX is DPV = calculate(count(pass),pass = "N") - Here i need to mention another cpndition with respect to above 2 condition.
Thanks,
Mohan
Solved! Go to Solution.
@mogunase1 , Plot month on-axis year on legend and use the given one as a measure.
Create a column like this in you table and date table and select this year and last year and save
Year Type = Switch( True(),
year([Date])= year(Today()),"This Year" ,
year([Date])= year(Today())-1,"Last Year" ,
Format([Date],"YYYY")
)
Hi, @mogunase1
Please correct me if I wrongly understood your question.
Please check the below picture and the sample pbix file's link down below.
All measures are in the sample pbix file.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
@mogunase1 , Plot month on-axis year on legend and use the given one as a measure.
Create a column like this in you table and date table and select this year and last year and save
Year Type = Switch( True(),
year([Date])= year(Today()),"This Year" ,
year([Date])= year(Today())-1,"Last Year" ,
Format([Date],"YYYY")
)
In this case,
I have data for 2019,2020 and no data for 2021.
But i always need current year (2021) and Previous year (2020) data alone, even though if there is no data in 2021 it need to show the chart with 0 value for 2021.
In this case what we can do?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |