Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Bonjour
Je veux calculer le prix d’un produit en pourcentage par rapport au mois précédent et par rapport au trimestre précédent. Mais le résultat donne une mesure vide dans le plat sur un visuel. Est-ce normal ?
J’ai une relation de plusieurs à 1 entre ma table et la table du calendrier.
Voici les formules utilisées. Merci d’avance pour votre aide.
TEST_3MONTH = DIVIDE(SUM(TEST[Prix])-CALCULATE(SUM(TEST[Prix]),PREVIOUSQUARTER('Calendrier'[Date])),CALCULATE(SUM(TEST[Prix]),PREVIOUSQUARTER( 'Calendrier'[Date])))
et
TEST_1MONTH = DIVIDE(SUM(TEST[Prix])-CALCULATE(SUM(TEST[Prix]),PREVIOUSMONTH('Calendrier'[Date])),CALCULATE(SUM(TEST[Prix]),PREVIOUSMONTH('Calendrier'[Date])))
Hi @huguo_90
You can try the following measures
TEST_1MONTH = var a=SUM(TEST[Prix])
return IF(a<>BLANK(),DIVIDE(SUM(TEST[Prix])-CALCULATE(SUM(TEST[Prix]),PREVIOUSMONTH(Calendrier[Date])),CALCULATE(SUM(TEST[Prix]),PREVIOUSMONTH(Calendrier[Date]))))
TEST_3MONTH = var a=SUM(TEST[Prix])
return IF(a<>BLANK(),DIVIDE(SUM(TEST[Prix])-CALCULATE(SUM(TEST[Prix]),PREVIOUSQUARTER(Calendrier[Date])),CALCULATE(SUM(TEST[Prix]),PREVIOUSQUARTER(Calendrier[Date]))))
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
78 | |
54 | |
39 | |
35 |
User | Count |
---|---|
102 | |
84 | |
48 | |
48 | |
48 |