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 All,
I'm trying to show the previous month in a card visual for our dashboard.
I've created a DAX using:
Sales Revenue Last Month = CALCULATE( SUM( FACT_VENTUREMARGIN[SALES_CURRENTYEARREVENUENZD] ), DATEADD(DimDate[Date], -1, MONTH))
I have joined the date table (Dimdate) with the FACT_VENTUREMARGIN table.
The formula is working how it's suppose to, however when I add Sales Revenue Last Month to the card visual it comes up with 214mil. How do I make it so it works out to be the previous month?
I was thinking that an IF Statement would work? i.e. Date.month = previous month text then "yes", "no". Then I can filter the visual on "yes" and would show the last month figures.
Here is the code I used for previous month text:
Previous Month Text = FORMAT(DATE("2020",MONTH(TODAY())-1,"01"),"mmmm")
Any help would be great!
Thanks all
Solved! Go to Solution.
Hi @Anonymous ,
If so ,you can click on the row in the table and see the card changed to the value in last month,or you can use a slicer to filter the data.
Hi @Anonymous ,
I have tested with my sample data and it works fine here, as you see below:
So would you pls check whether you have added a filter on the card visual,or you can check the interaction between the table visual and the card visual:
Go to menu bar>format>edit interactions,when you select the table visual,you will see that the card visual is showing filtered on the right top conner:
Thus,what the card visual shows should equal to the total number in a table visual.
@v-kelly-msft Thanks for the reply. I can get the card to show the full amount. Though what I want to be able to is have the card update automatically for the last month sales. That's where I thought the conditional formatting would help?
Thanks again.
Hi @Anonymous ,
If so ,you can click on the row in the table and see the card changed to the value in last month,or you can use a slicer to filter the data.
In this case, other visuals will get change when we select the month in slicer. which will not server the purpose.
Can you please let me know that should work in CARD visual and its should not impact on any other visuals.
@Anonymous
The formula seems fine. But that is date visual/card is taking. if there is no slicer or visual level filter it will end date of the calendar.
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 |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |