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.
Bonjour,
J'ai deux objets:
- un histogramme empilé avec en axe X des mois et en axe Y des montants
- une Carte qui doit afficher le montant du mois en cours
Mon problème est sur ce dernier point, comme la carte affiche le montant du dernier moi en cours, lorsque je clique sur un autre mois ma carte est (vide), car pour le moment j'ai mis un filtre pour que la carte affihce uniquement le dernier mois.
Si j'enlève mon filtre la carte affiche le total des montants de tous les mois (ce que je ne souhaite pas).
Comment faire pour que :
- lorsqu'aucun mois n'est sélectionnée la carte affiche le montant du mois en cours
- lorsqu'un mois est sélectionné ma carte affiche le montant du mois sélectionnée ?
Merci d'avance!
Solved! Go to Solution.
Hi, @Angèle
You can try the following methods.
Sample data:
Measure:
Measure =
IF (
SELECTEDVALUE ( 'Table'[Date] ) = BLANK (),
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( ALL ( 'Table' ), MONTH ( [Date] ) = MONTH ( TODAY () ) )
),
SUM ( 'Table'[Value] )
)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello !
Thank you for your answer,
It's more like if nothing is selected, my card should display "30" the sum of the last month, and not "70" as the picture
and if I select another month, it should display the sum of the month filteredn as the picture below
Hi, @Angèle
You can try the following methods.
Sample data:
Measure:
Measure =
IF (
SELECTEDVALUE ( 'Table'[Date] ) = BLANK (),
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( ALL ( 'Table' ), MONTH ( [Date] ) = MONTH ( TODAY () ) )
),
SUM ( 'Table'[Value] )
)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello !
Thank you for your answer,
It's more like if nothing is selected, my card should display "30" the sum of the last month, and not "70" as the picture
and if I select another month, it should display the sum of the month filteredn as the picture below
Hi, @Angèle
Measure:
Measure =
IF (
SELECTEDVALUE ( 'Table'[Date] ) = BLANK (),
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( ALL ( 'Table' ), MONTH ( [Date] ) = MONTH(TODAY())-1
)),
SUM ( 'Table'[Value] )
)
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
perfect thank you so much !!
@Angèle , Try like
MTD =
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _min = eomonth(_max,-1)+1 ,
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))
This Month =
var _max = eomonth(if(isfiltered('Date'),MAX( 'Date'[Date]) , today()),0)
var _min = eomonth(_max,-1)+1 ,
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))
Hello !
Thank you for your answer,
It's more like if nothing is selected, my card should display "30" the sum of the last month, and not "70" as the picture
and if I select another month, it should display the sum of the month filteredn as the picture below
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 |
---|---|
42 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
43 | |
39 | |
33 | |
18 | |
17 |